diff --git a/specs/latest/open-api3-latest-client.json b/specs/latest/open-api3-latest-client.json index b2c7c1f25..a0bba0dd4 100644 --- a/specs/latest/open-api3-latest-client.json +++ b/specs/latest/open-api3-latest-client.json @@ -141,7 +141,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -152,7 +155,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -1782,11 +1786,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -2150,7 +2155,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -2453,7 +2459,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2674,7 +2683,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2751,7 +2763,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -3059,7 +3074,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "identifier": { "type": "string", @@ -3279,7 +3297,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3366,7 +3387,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3600,7 +3624,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -4004,30 +4031,37 @@ } } }, - "\/avatars\/browsers\/{code}": { + "\/apps": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "List Applications", + "operationId": "appsList", "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": "List applications.", "responses": { "200": { - "description": "Image" + "description": "Apps list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appsList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", + "method": "list", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", + "type": "", + "demo": "apps\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4036,7 +4070,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [] } @@ -4050,111 +4083,174 @@ ], "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.", + "name": "queries", + "description": "Array of query strings generated using the Query 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" } ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + } + } } }, - "\/avatars\/credit-cards\/{code}": { + "\/apps\/{appId}": { "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + "summary": "Get Application", + "operationId": "appsGet", "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 application by its unique ID.", "responses": { "200": { - "description": "Image" + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", + "method": "get", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", + "type": "", + "demo": "apps\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4163,7 +4259,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [] } @@ -4177,117 +4272,212 @@ ], "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" - }, + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "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" - }, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "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" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/favicon": { + "\/apps\/{appId}\/secrets": { "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + "summary": "List Secrets", + "operationId": "appsListSecrets", "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": "List client secrets for an application.", "responses": { "200": { - "description": "Image" + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", + "method": "listSecrets", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", + "type": "", + "demo": "apps\/list-secrets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4296,7 +4486,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [] } @@ -4310,43 +4499,71 @@ ], "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": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "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": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image" + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getFlag", + "method": "createSecret", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", + "type": "", + "demo": "apps\/create-secret.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.write", "platforms": [ "console", "client", @@ -4355,7 +4572,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { "Project": [] } @@ -4369,34 +4585,698 @@ ], "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", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "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": "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": "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": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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" + } + ] + } + }, + "\/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" + } + }, + "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", + "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" + } + }, + "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", + "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" + } + }, + "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", + "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" + } + }, + "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", + "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", @@ -4846,14 +5726,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4929,14 +5811,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5022,14 +5906,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5115,14 +6001,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6106,39 +6994,193 @@ } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "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": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "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": false, + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "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": "Delete a transaction 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, + "deprecated": true, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/delete-transaction.md", + "demo": "databases\/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", + "server", "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\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, "auth": { "Project": [] } @@ -6152,58 +7194,153 @@ ], "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": "queries", + "description": "Array of query strings generated using the Query 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" } ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { + }, "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", + "summary": "Create document", + "operationId": "databasesCreateDocument", "tags": [ "databases" ], - "description": "Create multiple operations in a single transaction.", + "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": "Transaction", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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", - "server", "client", + "server", "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\/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": [] } @@ -6217,12 +7354,22 @@ ], "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). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -6233,14 +7380,44 @@ "schema": { "type": "object", "properties": { - "operations": { + "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": "Array of staged operations.", + "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": "[\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]", + "x-example": null, "items": { "type": "object" } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } } } @@ -6249,21 +7426,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", + "summary": "Get document", + "operationId": "databasesGetDocument", "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.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { "200": { - "description": "Documents List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/document" } } } @@ -6271,11 +7448,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "listDocuments", + "method": "getDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/list-documents.md", + "demo": "databases\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6288,10 +7465,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listRows" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -6325,6 +7502,16 @@ }, "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.", @@ -6347,39 +7534,16 @@ "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", + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", "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.", + "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", @@ -6394,11 +7558,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createDocument", + "method": "upsertDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-document.md", + "demo": "databases\/upsert-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -6411,16 +7575,16 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { - "name": "createDocument", + "name": "upsertDocument", "namespace": "databases", - "desc": "Create document", + "desc": "", "auth": { "Project": [] }, @@ -6435,8 +7599,7 @@ "required": [ "databaseId", "collectionId", - "documentId", - "data" + "documentId" ], "responses": [ { @@ -6444,12 +7607,12 @@ "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", + "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.createRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -6477,13 +7640,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). Make sure to define attributes before creating documents.", + "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": { @@ -6492,36 +7668,21 @@ "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": "" - }, "data": { "type": "object", - "description": "Document data as JSON 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, 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, the current permissions are inherited. [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.", @@ -6533,16 +7694,14 @@ } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", "tags": [ "databases" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "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", @@ -6557,15 +7716,15 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDocument", + "method": "updateDocument", "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", + "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", @@ -6574,10 +7733,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.getRow" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -6603,7 +7762,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", @@ -6620,41 +7779,149 @@ "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", + "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": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query 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": "collectionId", + "description": "Collection 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" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "query" + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "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.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { - "201": { + "200": { "description": "Document", "content": { "application\/json": { @@ -6667,64 +7934,28 @@ }, "deprecated": true, "x-appwrite": { - "method": "upsertDocument", + "method": "decrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/upsert-document.md", + "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", "client", "server", + "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" + "replaceWith": "tablesDB.decrementRowColumn" }, - "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": [] } @@ -6766,6 +7997,15 @@ "x-example": "" }, "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -6774,19 +8014,18 @@ "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}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "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" - }, + "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": { @@ -6800,14 +8039,16 @@ } } } - }, + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "tags": [ "databases" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { "description": "Document", @@ -6822,27 +8063,27 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateDocument", + "method": "incrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-document.md", + "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", + "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -6885,6 +8126,15 @@ "x-example": "" }, "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -6893,19 +8143,18 @@ "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}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "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" - }, + "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": { @@ -6919,43 +8168,48 @@ } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", "tags": [ - "databases" + "documentsDB" ], - "description": "Delete a document by its unique ID.", + "description": "List transactions across all databases.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "listTransactions", + "group": "transactions", "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\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ "console", - "client", "server", + "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" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", "auth": { "Project": [] } @@ -6969,34 +8223,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#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).", + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "JWT": [] } ], "requestBody": { @@ -7005,11 +8293,12 @@ "schema": { "type": "object", "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" } } } @@ -7018,50 +8307,46 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a transaction by its unique ID.", "responses": { "200": { - "description": "Document", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "getTransaction", + "group": "transactions", "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": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "client", - "server", "console", + "server", + "client", "server" ], "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\/get-transaction.md", "auth": { "Project": [] } @@ -7075,122 +8360,56 @@ ], "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": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute 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 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\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + ] + }, "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "Document", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "updateTransaction", + "group": "transactions", "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}", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "documents.write", "platforms": [ - "client", - "server", "console", + "server", + "client", "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-transaction.md", "auth": { "Project": [] } @@ -7204,41 +8423,12 @@ ], "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": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } @@ -7249,64 +8439,47 @@ "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 + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false } } } } } } - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", "tags": [ "documentsDB" ], - "description": "List transactions across all databases.", + "description": "Delete a transaction by its unique ID.", "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", + "method": "deleteTransaction", "group": "transactions", "cookies": false, "type": "", - "demo": "documentsdb\/list-transactions.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", "server", @@ -7315,7 +8488,7 @@ ], "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\/documentsdb\/delete-transaction.md", "auth": { "Project": [] } @@ -7329,27 +8502,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).", - "required": false, + "name": "transactionId", + "description": "Transaction ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - }, + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", "tags": [ "documentsDB" ], - "description": "Create a new transaction.", + "description": "Create multiple operations in a single transaction.", "responses": { "201": { "description": "Transaction", @@ -7364,24 +8536,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", + "method": "createOperations", "group": "transactions", "cookies": false, "type": "", - "demo": "documentsdb\/create-transaction.md", + "demo": "documentsdb\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "documents.write", "platforms": [ - "console", "server", "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", "auth": { "Project": [] } @@ -7393,18 +8564,32 @@ "JWT": [] } ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "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" + "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" + } } } } @@ -7413,21 +8598,21 @@ } } }, - "\/documentsdb\/transactions\/{transactionId}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", + "summary": "List documents", + "operationId": "documentsDBListDocuments", "tags": [ "documentsDB" ], - "description": "Get a transaction 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": { "200": { - "description": "Transaction", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -7435,24 +8620,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/get-transaction.md", + "demo": "documentsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "documents.read", "platforms": [ "console", - "server", "client", + "server", "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\/list-documents.md", "auth": { "Project": [] } @@ -7466,31 +8651,87 @@ ], "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": "queries", + "description": "Array of query strings generated using the Query 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" } ] }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", "tags": [ "documentsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "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": "Transaction", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/document" } } } @@ -7498,24 +8739,83 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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", - "server", "client", + "server", "server" ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "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": [] } @@ -7529,12 +8829,22 @@ ], "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). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -7545,56 +8855,90 @@ "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": 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.", + "default": "", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false + "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": "" } } } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", "tags": [ "documentsDB" ], - "description": "Delete a transaction 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": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/delete-transaction.md", + "demo": "documentsdb\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "documents.read", "platforms": [ "console", - "server", "client", + "server", "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\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -7608,33 +8952,74 @@ ], "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": "queries", + "description": "Array of query strings generated using the Query 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" } ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", "tags": [ "documentsDB" ], - "description": "Create multiple operations in a single transaction.", + "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": "Transaction", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/document" } } } @@ -7642,23 +9027,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "upsertDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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": [ - "server", + "console", "client", + "server", "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\/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": [] } @@ -7672,12 +9090,32 @@ ], "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" } @@ -7688,37 +9126,45 @@ "schema": { "type": "object", "properties": { - "operations": { + "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": "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": "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" } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" } } } } } } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", "tags": [ "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": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { "200": { - "description": "Documents List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/document" } } } @@ -7726,15 +9172,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", + "method": "updateDocument", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.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", @@ -7743,7 +9189,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -7768,7 +9214,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", @@ -7777,80 +9223,67 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query 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": "documentId", + "description": "Document 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 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 + "x-example": "" }, - "in": "query" + "in": "path" } - ] + ], + "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": "" + } + } + } + } + } + } }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", "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.", + "description": "Delete a document by its unique ID.", "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createDocument", + "method": "deleteDocument", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", @@ -7862,66 +9295,7 @@ ], "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 - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } @@ -7946,13 +9320,23 @@ }, { "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", "x-example": "" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -7961,35 +9345,6 @@ "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": "" - }, - "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.", @@ -8002,14 +9357,14 @@ } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", "tags": [ "documentsDB" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Decrement a specific column of a row by a given value.", "responses": { "200": { "description": "Document", @@ -8024,24 +9379,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDocument", + "method": "decrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.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", "client", "server", + "console", "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\/documentsdb\/decrement-document-attribute.md", "auth": { "Project": [] } @@ -8066,7 +9421,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", @@ -8085,39 +9440,56 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query 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": "attribute", + "description": "Attribute key.", + "required": true, "schema": { - "type": "string", - "x-example": "" + "type": "string" }, - "in": "query" + "in": "path" } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", + ], + "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", "tags": [ "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#documentsDBCreateCollection) API or directly from your database console.", + "description": "Increment a specific column of a row by a given value.", "responses": { - "201": { + "200": { "description": "Document", "content": { "application\/json": { @@ -8130,56 +9502,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", + "method": "incrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/upsert-document.md", + "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": [ - "console", "client", "server", + "console", "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 - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", "auth": { "Project": [] } @@ -8221,6 +9561,15 @@ "x-example": "" }, "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -8229,19 +9578,18 @@ "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": "{}" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "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" - } + "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", @@ -8253,21 +9601,112 @@ } } } - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", + } + }, + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", "tags": [ - "documentsDB" + "functions" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "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": "Document", + "description": "Executions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/executionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listExecutions", + "group": "executions", + "cookies": false, + "type": "", + "demo": "functions\/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "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", + "tags": [ + "functions" + ], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" } } } @@ -8275,15 +9714,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createExecution", + "group": "executions", "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": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ "console", "client", @@ -8292,7 +9734,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -8306,32 +9747,12 @@ ], "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": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -8342,54 +9763,93 @@ "schema": { "type": "object", "properties": { - "data": { + "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" + }, + "headers": { "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "description": "HTTP headers of execution. Defaults to empty.", "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": { + "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 } } } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", "tags": [ - "documentsDB" + "functions" ], - "description": "Delete a document by its unique ID.", + "description": "Get a function execution log by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Execution", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/execution" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "getExecution", + "group": "executions", "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": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", "client", @@ -8398,7 +9858,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } @@ -8412,69 +9871,96 @@ ], "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" } + ] + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", + "tags": [ + "graphql" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", "tags": [ - "documentsDB" + "graphql" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Execute a GraphQL mutation.", "responses": { "200": { - "description": "Document", + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/any" } } } @@ -8482,24 +9968,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "mutation", + "group": "graphql", "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.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", - "platforms": [ - "client", - "server", + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ "console", + "server", + "client", "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\/graphql\/post.md", "auth": { "Project": [] } @@ -8510,94 +9996,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": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", "tags": [ - "documentsDB" + "locale" ], - "description": "Increment a specific column of a row by a given value.", + "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": "Document", + "description": "Locale", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/locale" } } } @@ -8605,24 +10021,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "get", + "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\/get.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\/get-locale.md", "auth": { "Project": [] } @@ -8633,94 +10049,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 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": "" - } - } - } - } - } - } + ] } }, - "\/functions\/{functionId}\/executions": { + "\/locale\/codes": { "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", + "summary": "List locale codes", + "operationId": "localeListCodes", "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 locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", "responses": { "200": { - "description": "Executions List", + "description": "Locale codes list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/executionList" + "$ref": "#\/components\/schemas\/localeCodeList" } } } @@ -8728,18 +10074,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listExecutions", - "group": "executions", + "method": "listCodes", + "group": null, "cookies": false, "type": "", - "demo": "functions\/list-executions.md", + "demo": "locale\/list-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -8748,6 +10091,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [] } @@ -8758,58 +10102,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\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", "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 continents. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "Execution", + "200": { + "description": "Continents List", "content": { - "multipart\/form-data": { + "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/continentList" } } } @@ -8817,18 +10127,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createExecution", - "group": "executions", + "method": "listContinents", + "group": null, "cookies": false, "type": "", - "demo": "functions\/create-execution.md", + "demo": "locale\/list-continents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -8837,6 +10144,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [] } @@ -8847,93 +10155,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" - }, - "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\/countries": { "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", + "summary": "List countries", + "operationId": "localeListCountries", "tags": [ - "functions" + "locale" ], - "description": "Get a function execution log by its unique ID.", + "description": "List of all countries. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "Execution", + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/countryList" } } } @@ -8941,18 +10180,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getExecution", - "group": "executions", + "method": "listCountries", + "group": null, "cookies": false, "type": "", - "demo": "functions\/get-execution.md", + "demo": "locale\/list-countries.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -8961,6 +10197,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [] } @@ -8971,46 +10208,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\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", "tags": [ - "graphql" + "locale" ], - "description": "Execute a GraphQL mutation.", + "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": "Any", + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/countryList" } } } @@ -9018,24 +10233,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "query", - "group": "graphql", + "method": "listCountriesEU", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "locale\/list-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "locale.read", "platforms": [ "console", - "server", "client", + "server", "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-countries-eu.md", "auth": { "Project": [] } @@ -9049,21 +10264,21 @@ ] } }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", "tags": [ - "graphql" + "locale" ], - "description": "Execute a GraphQL mutation.", + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "Any", + "description": "Phones List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/phoneList" } } } @@ -9071,24 +10286,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "mutation", - "group": "graphql", + "method": "listCountriesPhones", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "locale.read", "platforms": [ "console", - "server", "client", + "server", "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-countries-phones.md", "auth": { "Project": [] } @@ -9102,21 +10317,21 @@ ] } }, - "\/locale": { + "\/locale\/currencies": { "get": { - "summary": "Get user locale", - "operationId": "localeGet", + "summary": "List currencies", + "operationId": "localeListCurrencies", "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))", + "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": "Locale", + "description": "Currencies List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/locale" + "$ref": "#\/components\/schemas\/currencyList" } } } @@ -9124,11 +10339,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "listCurrencies", "group": null, "cookies": false, "type": "", - "demo": "locale\/get.md", + "demo": "locale\/list-currencies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9141,7 +10356,7 @@ ], "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\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -9155,21 +10370,21 @@ ] } }, - "\/locale\/codes": { + "\/locale\/languages": { "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", + "summary": "List languages", + "operationId": "localeListLanguages", "tags": [ "locale" ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "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": "Locale codes list", + "description": "Languages List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" + "$ref": "#\/components\/schemas\/languageList" } } } @@ -9177,11 +10392,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCodes", + "method": "listLanguages", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-codes.md", + "demo": "locale\/list-languages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9194,7 +10409,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -9208,21 +10423,21 @@ ] } }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", + "\/messaging\/topics\/{topicId}\/subscribers": { + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", "tags": [ - "locale" + "messaging" ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "description": "Create a new subscriber.", "responses": { - "200": { - "description": "Continents List", + "201": { + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/continentList" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -9230,24 +10445,24 @@ }, "deprecated": false, "x-appwrite": { - "method": "listContinents", - "group": null, + "method": "createSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "locale\/list-continents.md", + "demo": "messaging\/create-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "subscribers.write", "platforms": [ - "console", - "client", "server", + "client", + "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [] } @@ -9255,52 +10470,85 @@ "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": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } } }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", "tags": [ - "locale" + "messaging" ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "description": "Delete a subscriber by its unique ID.", "responses": { - "200": { - "description": "Countries List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/countryList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listCountries", - "group": null, + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "locale\/list-countries.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", - "client", "server", + "client", + "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [] } @@ -9308,27 +10556,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\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "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": "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": "Countries List", + "description": "OAuth2 Approve", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/oauth2Approve" } } } @@ -9336,52 +10606,86 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesEU", + "method": "approve", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-countries-eu.md", + "demo": "oauth2\/approve.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "oauth2.write", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { - "Project": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], + "ProjectQuery": [], "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" + } + ], + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, - "\/locale\/countries\/phones": { + "\/oauth2\/{project_id}\/authorize": { "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", "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": "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": "Phones List", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/phoneList" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -9389,52 +10693,179 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesPhones", + "method": "authorize", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-countries-phones.md", + "demo": "oauth2\/authorize.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "auth": { - "Project": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [] + "ProjectQuery": [], + "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.", + "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.", + "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" } ] } }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", "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": "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": "Currencies List", + "201": { + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/currencyList" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -9442,24 +10873,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCurrencies", + "method": "createGrant", "group": null, "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\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ - "console", "client", - "server", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -9470,24 +10898,55 @@ "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\/languages": { + "\/oauth2\/{project_id}\/grants\/{grant_id}": { "get": { - "summary": "List languages", - "operationId": "localeListLanguages", + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", "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": "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": "Languages List", + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/languageList" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -9495,24 +10954,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLanguages", + "method": "getGrant", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-languages.md", + "demo": "oauth2\/get-grant.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "oauth2.read", "platforms": [ - "console", "client", "server", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -9523,24 +10980,46 @@ "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" + } ] } }, - "\/messaging\/topics\/{topicId}\/subscribers": { + "\/oauth2\/{project_id}\/reject": { "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new subscriber.", + "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": { - "201": { - "description": "Subscriber", + "200": { + "description": "OAuth2 Reject", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/oauth2Reject" } } } @@ -9548,43 +11027,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "reject", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", + "demo": "oauth2\/reject.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "oauth2.write", "platforms": [ - "server", "client", - "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { - "Project": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], - "JWT": [], - "Session": [] + "ProjectQuery": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -9595,20 +11071,14 @@ "schema": { "type": "object", "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" - }, - "targetId": { + "grant_id": { "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "" + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "" } }, "required": [ - "subscriberId", - "targetId" + "grant_id" ] } } @@ -9616,74 +11086,6 @@ } } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "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" - } - ] - } - }, "\/presences": { "get": { "summary": "List presences", @@ -9870,7 +11272,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10003,7 +11406,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10335,7 +11739,10 @@ "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-upload-id": true, + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "file": { "type": "string", @@ -10636,14 +12043,16 @@ "public": true, "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": [ @@ -10715,14 +12124,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -10941,14 +12352,16 @@ "public": true, "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": [ @@ -11674,7 +13087,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -12592,7 +14008,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -14185,7 +15604,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -14438,6 +15860,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -14726,6 +16151,10 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -15472,10 +16901,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -15494,7 +16929,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -15775,10 +17213,40 @@ "description": "User phone number in E.164 format.", "x-example": "+4930901820" }, - "emailVerification": { + "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": "Email verification status.", - "x-example": true + "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", @@ -15862,6 +17330,11 @@ "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": { @@ -16782,6 +18255,11 @@ "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", @@ -16807,6 +18285,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -16823,6 +18302,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -17153,399 +18633,855 @@ "properties": { "code": { "type": "string", - "description": "Phone code.", - "x-example": "+1" + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "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": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "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": "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" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "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" + }, + "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" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "countryCode": { + "targetId": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Target ID.", + "x-example": "259125845563242502" }, - "countryName": { + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "$ref": "#\/components\/schemas\/target" + } + }, + "userId": { "type": "string", - "description": "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": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { "type": "string", - "description": "Header name.", - "x-example": "Content-Type" + "description": "User Name.", + "x-example": "Aegon Targaryen" }, - "value": { + "topicId": { "type": "string", - "description": "Header value.", - "x-example": "application\/json" + "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": [ - "name", - "value" + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" ], "example": { - "name": "Content-Type", - "value": "application\/json" + "$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" } }, - "mfaChallenge": { - "description": "MFA Challenge", + "target": { + "description": "Target", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "Target ID.", + "x-example": "259125845563242502" }, "$createdAt": { "type": "string", - "description": "Token creation date in ISO 8601 format.", + "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": "5e5ea5c168bb8" + "x-example": "259125845563242502" }, - "expire": { + "providerId": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ "$id", "$createdAt", + "$updatedAt", + "name", "userId", - "expire" + "providerType", + "identifier", + "expired" ], "example": { - "$id": "bb8ea5c16897e", + "$id": "259125845563242502", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "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 } }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", + "app": { + "description": "App", "type": "object", "properties": { - "recoveryCodes": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "redirectUris": { "type": "array", - "description": "Recovery codes.", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", "items": { "type": "string" }, "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" + "https:\/\/example.com\/callback" ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "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": { + "enabled": { "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", + "description": "Whether the app is enabled or not.", "x-example": true }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "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" }, - "email": { + "deviceFlow": { "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "x-example": false }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] } }, "required": [ - "totp", - "phone", - "email", - "recoveryCode" + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" ], "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", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] } }, - "transaction": { - "description": "Transaction", + "appSecret": { + "description": "AppSecret", "type": "object", "properties": { "$id": { "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Transaction 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": "Transaction update date in ISO 8601 format.", + "description": "Secret update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "appId": { "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" + "secret": { + "type": "string", + "description": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" }, - "expiresAt": { + "hint": { "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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", "$updatedAt", - "status", - "operations", - "expiresAt" + "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", - "status": "pending", - "operations": 5, - "expiresAt": "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" } }, - "subscriber": { - "description": "Subscriber", + "appSecretPlaintext": { + "description": "AppSecretPlaintext", "type": "object", "properties": { "$id": { "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Subscriber 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": "Subscriber update date in ISO 8601 format.", + "description": "Secret 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": "Application ID this secret belongs to.", + "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" - }, - "items": { - "$ref": "#\/components\/schemas\/target" - } + "secret": { + "type": "string", + "description": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked value.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "userId": { + "hint": { "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "userName": { + "createdById": { "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "topicId": { + "createdByName": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "Name of the user who created the secret.", + "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 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", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" + "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", - "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" + "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" }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" + "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" } }, - "target": { - "description": "Target", + "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" + } + }, + "oauth2Grant": { + "description": "OAuth2 Grant", "type": "object", "properties": { "$id": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "Grant ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Target 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": "Target 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": { + "userId": { "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" + "description": "ID of the user the grant belongs to.", + "x-example": "5e5ea5c16897e" }, - "userId": { + "appId": { "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "x-example": "5e5ea5c16897e" }, - "providerId": { + "scopes": { + "type": "array", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] + }, + "authorizationDetails": { "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true + "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\"]}]" }, - "providerType": { + "prompt": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "x-example": "login" }, - "identifier": { + "redirectUri": { "type": "string", - "description": "The target identifier.", - "x-example": "token" + "description": "Redirect URI the user will be sent to after the flow completes.", + "x-example": "https:\/\/example.com\/callback" }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false + "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", - "name", "userId", - "providerType", - "identifier", - "expired" + "appId", + "scopes", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" ], "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 + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" + ], + "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" + } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "$ref": "#\/components\/schemas\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" } } }, @@ -17559,6 +19495,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "JWT": { "type": "apiKey", "name": "X-Appwrite-JWT", diff --git a/specs/latest/open-api3-latest-console.json b/specs/latest/open-api3-latest-console.json index 3de202c92..d95039efa 100644 --- a/specs/latest/open-api3-latest-console.json +++ b/specs/latest/open-api3-latest-console.json @@ -141,7 +141,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -152,7 +155,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -2673,11 +2677,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -3502,7 +3507,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -3805,305 +3811,314 @@ "userId": { "type": "string", "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/oauth2\/{provider}": { - "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", - "tags": [ - "account" - ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", - "responses": { - "301": { - "description": "File" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createOAuth2Session", - "group": "sessions", - "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-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-oauth2.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "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.", - "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" - }, - "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": true, - "x-appwrite": { - "method": "updatePhoneSession", - "group": "sessions", - "cookies": false, - "type": "", - "demo": "account\/update-phone-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "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": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": [ - "userId", - "secret" - ] - } - } - } - } - } - }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", - "responses": { - "201": { - "description": "Session", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/session" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSession", - "group": "sessions", - "cookies": false, - "type": "", - "demo": "account\/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", - "scope": "sessions.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/oauth2\/{provider}": { + "get": { + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", + "tags": [ + "account" + ], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "responses": { + "301": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOAuth2Session", + "group": "sessions", + "cookies": false, + "type": "webAuth", + "demo": "account\/create-o-auth-2-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-oauth2.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "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.", + "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" + }, + "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": true, + "x-appwrite": { + "method": "updatePhoneSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/update-phone-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "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": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "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" + ] + } + } + } + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "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", @@ -4411,7 +4426,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "identifier": { "type": "string", @@ -4631,7 +4649,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -4718,7 +4739,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -4952,7 +4976,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -5480,6 +5507,862 @@ ] } }, + "\/apps": { + "get": { + "summary": "List Applications", + "operationId": "appsList", + "tags": [ + "apps" + ], + "description": "List applications.", + "responses": { + "200": { + "description": "Apps list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "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 Application", + "operationId": "appsCreate", + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + } + } + } + }, + "\/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": null, + "cookies": false, + "type": "", + "demo": "apps\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "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" + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": { + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "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": "queries", + "description": "Array of query strings generated using the Query 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 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", + "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}": { + "get": { + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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" + } + ] + } + }, + "\/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": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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" + } + ] + } + }, "\/avatars\/browsers\/{code}": { "get": { "summary": "Get browser icon", @@ -5514,7 +6397,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5522,7 +6406,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5642,7 +6527,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5650,7 +6536,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5776,7 +6663,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5784,7 +6672,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5836,7 +6725,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5844,7 +6734,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6326,7 +7217,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6334,7 +7226,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6410,7 +7303,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6418,7 +7312,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6504,7 +7399,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6512,7 +7408,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6598,7 +7495,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6606,7 +7504,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -7432,6 +8331,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7562,6 +8462,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -7695,7 +8598,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -7714,6 +8620,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7968,6 +8875,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -8045,6 +8955,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8055,7 +8966,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "newResourceName": { "type": "string", @@ -8315,13 +9229,22 @@ "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-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.", @@ -8343,13 +9266,13 @@ "type": { "type": "string", "description": "Database type: shared (serverless) or dedicated (always-on).", - "default": "shared", + "default": "dedicated", "x-example": "shared" }, "specification": { "type": "string", "description": "Specification identifier.", - "default": "starter", + "default": "s-2vcpu-2gb", "x-example": "" }, "backend": { @@ -8361,21 +9284,21 @@ "cpu": { "type": "integer", "description": "CPU in millicores (125-16000).", - "default": 1000, + "default": 2000, "x-example": 125, "format": "int32" }, "memory": { "type": "integer", "description": "Memory in MB to allocate (128-65536).", - "default": 1024, + "default": 2048, "x-example": 128, "format": "int32" }, "storage": { "type": "integer", "description": "Storage in GB to allocate (1-16384).", - "default": 10, + "default": 25, "x-example": 1, "format": "int32" }, @@ -8407,7 +9330,7 @@ }, "highAvailabilitySyncMode": { "type": "string", - "description": "Replication sync mode. Allowed values: async, sync, quorum.", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", "x-example": "async", "x-nullable": true }, @@ -8496,7 +9419,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -8516,6 +9439,53 @@ } } }, + "\/compute\/databases\/specifications": { + "get": { + "summary": "List dedicated database specifications.", + "operationId": "computeListDatabaseSpecifications", + "tags": [ + "compute" + ], + "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": "listDatabaseSpecifications", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-specifications.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": [] + } + ] + } + }, "\/compute\/databases\/{databaseId}": { "get": { "summary": "Get dedicated database.", @@ -8694,6 +9664,12 @@ "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.", @@ -9034,7 +10010,189 @@ "default": "full", "x-example": "full" } - } + } + } + } + } + } + } + }, + "\/compute\/databases\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List database backup policies.", + "operationId": "computeListDatabaseBackupPolicies", + "tags": [ + "compute" + ], + "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": "listDatabaseBackupPolicies", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-backup-policies.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" + }, + { + "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", + "tags": [ + "compute" + ], + "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": "createDatabaseBackupPolicy", + "group": "databases", + "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", + "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" + } + ], + "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" + ] } } } @@ -9408,7 +10566,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "ttl": { "type": "integer", @@ -9754,7 +10915,7 @@ } ] }, - "post": { + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "tags": [ @@ -9819,7 +10980,7 @@ "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.network\/v1\/sql\/execute` 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.", + "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\/execute` 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", @@ -10326,178 +11487,6 @@ } } }, - "\/compute\/databases\/{databaseId}\/insights": { - "get": { - "summary": "Get database performance insights.", - "operationId": "computeGetDatabaseInsights", - "tags": [ - "compute" - ], - "description": "Get query-level performance insights for a dedicated database. Returns top queries by execution time, wait events, and aggregate query statistics.", - "responses": { - "200": { - "description": "PerformanceInsights", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePerformanceInsights" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseInsights", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-insights.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" - }, - { - "name": "period", - "description": "Analysis period for performance insights. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days).", - "required": false, - "schema": { - "type": "string", - "x-example": "1h", - "default": "1h" - }, - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of queries to return.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 25 - }, - "in": "query" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", - "tags": [ - "compute" - ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", - "responses": { - "200": { - "description": "Dedicated database audit logs list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseAuditLogList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDatabaseLogs", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/list-database-logs.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" - }, - { - "name": "startTime", - "description": "Start time in ISO 8601 format.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "endTime", - "description": "End time in ISO 8601 format.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of logs to return.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 100 - }, - "in": "query" - } - ] - } - }, "\/compute\/databases\/{databaseId}\/maintenance": { "patch": { "summary": "Update database maintenance window.", @@ -10554,103 +11543,33 @@ }, "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" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/metrics": { - "get": { - "summary": "Get database metrics.", - "operationId": "computeGetDatabaseMetrics", - "tags": [ - "compute" - ], - "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", - "responses": { - "200": { - "description": "DatabaseMetrics", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseMetrics" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseMetrics", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-metrics.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" - }, - { - "name": "period", - "description": "Metrics aggregation period. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", - "required": false, - "schema": { - "type": "string", - "x-example": "1h", - "default": "24h" - }, - "in": "query" - } - ] + ], + "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" + ] + } + } + } + } } }, "\/compute\/databases\/{databaseId}\/migrations": { @@ -10660,7 +11579,7 @@ "tags": [ "compute" ], - "description": "Migrate a database between shared and dedicated types. Shared to dedicated creates an always-on StatefulSet with external access. Dedicated to shared converts to a serverless pod that scales to zero when idle. Data is preserved during migration.", + "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", @@ -10720,6 +11639,12 @@ "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 compute specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "", + "x-nullable": true } }, "required": [ @@ -11285,241 +12210,21 @@ ] } }, - "\/compute\/databases\/{databaseId}\/schema\/preview": { - "post": { - "summary": "Preview a schema change.", - "operationId": "computeCreateDatabaseSchemaPreview", - "tags": [ - "compute" - ], - "description": "Preview a schema change against a dedicated database. Returns the expected impact including affected collections, records, and a dry-run diff of the schema before and after the change.", - "responses": { - "200": { - "description": "SchemaPreview", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSchemaPreview" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseSchemaPreview", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-schema-preview.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": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "sql": { - "type": "string", - "description": "Schema statement to preview.", - "x-example": "" - } - }, - "required": [ - "sql" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/slow-queries": { - "get": { - "summary": "List slow queries.", - "operationId": "computeListDatabaseQueries", - "tags": [ - "compute" - ], - "description": "List slow queries for a dedicated database. Returns queries that exceeded the specified threshold.", - "responses": { - "200": { - "description": "Dedicated database slow queries list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSlowQueryList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDatabaseQueries", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/list-database-queries.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" - }, - { - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseStatus", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-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": "" - }, - "in": "path" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/upgrades": { + "\/compute\/databases\/{databaseId}\/schema\/preview": { "post": { - "summary": "Upgrade database version.", - "operationId": "computeCreateDatabaseUpgrade", + "summary": "Preview a schema change.", + "operationId": "computeCreateDatabaseSchemaPreview", "tags": [ "compute" ], - "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "description": "Preview a schema change against a dedicated database. Returns the expected impact including affected collections, records, and a dry-run diff of the schema before and after the change.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "SchemaPreview", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSchemaPreview" } } } @@ -11527,11 +12232,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseUpgrade", + "method": "createDatabaseSchemaPreview", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/create-database-upgrade.md", + "demo": "compute\/create-database-schema-preview.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11568,14 +12273,14 @@ "schema": { "type": "object", "properties": { - "targetVersion": { + "sql": { "type": "string", - "description": "Target engine version to upgrade to.", - "x-example": "" + "description": "Schema statement to preview.", + "x-example": "" } }, "required": [ - "targetVersion" + "sql" ] } } @@ -11583,21 +12288,21 @@ } } }, - "\/compute\/databases\/{databaseId}\/usage": { + "\/compute\/databases\/{databaseId}\/slow-queries": { "get": { - "summary": "Get database usage metrics.", - "operationId": "computeGetDatabaseUsage", + "summary": "List slow queries.", + "operationId": "computeListDatabaseQueries", "tags": [ "compute" ], - "description": "Get usage metrics for a dedicated database including CPU, memory, storage, connections, and query statistics.", + "description": "List slow queries for a dedicated database. Returns queries that exceeded the specified threshold.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "Dedicated database slow queries list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseUsage" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSlowQueryList" } } } @@ -11605,11 +12310,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "listDatabaseQueries", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-usage.md", + "demo": "compute\/list-database-queries.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11640,19 +12345,169 @@ "in": "path" }, { - "name": "range", - "description": "Date range.", + "name": "limit", + "description": "Maximum number of queries to return.", "required": false, "schema": { - "type": "string", - "x-example": "24h", - "default": "30d" + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDatabaseStatus", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/get-database-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": "" + }, + "in": "path" + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/upgrades": { + "post": { + "summary": "Upgrade database version.", + "operationId": "computeCreateDatabaseUpgrade", + "tags": [ + "compute" + ], + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatabaseUpgrade", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/create-database-upgrade.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": "" + }, + "in": "path" + } + ], + "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", @@ -12747,6 +13602,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "appsecrets", + "oauth2grants", "attributes", "indexes", "functions", @@ -12831,6 +13689,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "app_secrets", + "oauth2_grants", "attributes", "indexes", "functions", @@ -13357,7 +14218,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -14388,7 +15252,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -19651,7 +20518,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -20262,6 +21132,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -21812,7 +22685,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -21824,6 +22700,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -22644,7 +23526,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -23214,7 +24099,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -29317,7 +30205,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -29424,7 +30315,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -29579,9 +30470,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -29914,7 +30808,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "default": [] }, @@ -30340,7 +31234,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -30495,9 +31389,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -31369,14 +32266,16 @@ "packaging": false, "public": true, "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -31592,7 +32491,7 @@ "201": { "description": "Execution", "content": { - "multipart\/form-data": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/execution" } @@ -32080,7 +32979,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -32549,6 +33451,56 @@ ] } }, + "\/health\/audits-db": { + "get": { + "summary": "Get audits DB", + "operationId": "healthGetAuditsDB", + "tags": [ + "health" + ], + "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", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuditsDB", + "group": null, + "cookies": false, + "type": "", + "demo": "health\/get-audits-db.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\/health\/get-audits-db.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, "\/health\/cache": { "get": { "summary": "Get cache", @@ -34876,6 +35828,114 @@ ] } }, + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", + "tags": [ + "manager" + ], + "description": "Clears internal cache.", + "responses": { + "200": { + "description": "File" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCache", + "group": "cache", + "cookies": false, + "type": "", + "demo": "manager\/delete-cache.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": { + "region": { + "type": "string", + "description": "Target region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region" + }, + "cache": { + "type": "string", + "description": "Cache target.", + "default": "cache", + "x-example": "cache", + "enum": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "x-enum-name": "CacheTarget" + }, + "all": { + "type": "boolean", + "description": "Clear the entire selected cache target.", + "default": false, + "x-example": false + }, + "database": { + "type": "string", + "description": "Database cache scope.", + "default": "console", + "x-example": "console", + "enum": [ + "console", + "project", + "logs" + ], + "x-enum-name": "CacheDatabase" + }, + "projectId": { + "type": "string", + "description": "Project ID for project or logs database cache.", + "default": "", + "x-example": "" + }, + "collectionId": { + "type": "string", + "description": "Collection ID.", + "default": "", + "x-example": "" + }, + "documentId": { + "type": "string", + "description": "Document ID.", + "default": "", + "x-example": "" + } + } + } + } + } + } + } + }, "\/manager\/users\/status": { "patch": { "summary": "Update a user status by ID or email", @@ -35096,7 +36156,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "subject": { "type": "string", @@ -35408,7 +36471,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "title": { "type": "string", @@ -35868,7 +36934,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "content": { "type": "string", @@ -36616,7 +37685,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -36976,7 +38048,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37216,7 +38291,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37469,7 +38547,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37671,7 +38752,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37900,7 +38984,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -38034,11 +39121,267 @@ "x-example": false, "x-nullable": true }, - "apiKey": { + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/ses": { + "post": { + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Amazon SES provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSesProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-ses-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-ses-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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "" + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "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\/ses\/{providerId}": { + "patch": { + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", + "tags": [ + "messaging" + ], + "description": "Update an Amazon SES provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSesProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-ses-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-ses-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "accessKey": { "type": "string", - "description": "Sendgrid API key.", + "description": "AWS access key ID.", "default": "", - "x-example": "" + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" }, "fromName": { "type": "string", @@ -38215,7 +39558,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -38244,7 +39590,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -38490,7 +39837,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -38610,7 +39958,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -38813,7 +40164,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39016,7 +40370,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39219,7 +40576,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39794,7 +41154,10 @@ "topicId": { "type": "string", "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -40278,7 +41641,10 @@ "subscriberId": { "type": "string", "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "targetId": { "type": "string", @@ -40582,6 +41948,9 @@ "user", "team", "membership", + "auth-methods", + "policies", + "oauth2-provider", "database", "table", "column", @@ -40605,7 +41974,16 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" ], "x-enum-name": "AppwriteMigrationResource" } @@ -40636,7 +42014,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -40710,6 +42088,9 @@ "user", "team", "membership", + "auth-methods", + "policies", + "oauth2-provider", "database", "table", "column", @@ -40733,7 +42114,16 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" ], "x-enum-name": "AppwriteMigrationResource" } @@ -40978,7 +42368,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -41346,7 +42736,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -41462,7 +42852,8 @@ "password": { "type": "string", "description": "Source's Database Password", - "x-example": "" + "x-example": "password", + "format": "password" }, "port": { "type": "integer", @@ -41616,7 +43007,8 @@ "required": true, "schema": { "type": "string", - "x-example": "" + "format": "password", + "x-example": "password" }, "in": "query" }, @@ -41732,7 +43124,8 @@ "password": { "type": "string", "description": "Source's Database Password", - "x-example": "" + "x-example": "password", + "format": "password" }, "port": { "type": "integer", @@ -41876,7 +43269,8 @@ "required": true, "schema": { "type": "string", - "x-example": "" + "format": "password", + "x-example": "password" }, "in": "query" }, @@ -42192,7 +43586,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -42956,7 +44353,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -43573,7 +44973,7 @@ "baa", "backup_recovery" ], - "x-enum-name": "OrganizationAddon" + "x-enum-name": "Addon" }, "in": "path" } @@ -44817,7 +46217,7 @@ "method": "getInvoiceDownload", "group": null, "cookies": false, - "type": "", + "type": "location", "demo": "organizations\/get-invoice-download.md", "rate-limit": 0, "rate-time": 3600, @@ -44830,12 +46230,14 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -45046,7 +46448,7 @@ "method": "getInvoiceView", "group": null, "cookies": false, - "type": "", + "type": "location", "demo": "organizations\/get-invoice-view.md", "rate-limit": 0, "rate-time": 3600, @@ -45059,12 +46461,14 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -46399,7 +47803,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -46414,7 +47819,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -46422,7 +47826,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -46534,14 +47937,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -46549,7 +47953,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -46557,8 +47960,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -46567,7 +47969,7 @@ } ], "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-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -47006,7 +48408,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -47110,9 +48515,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -47287,9 +48695,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -47538,9 +48949,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -48104,6 +49518,160 @@ ] } }, + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", + "tags": [ + "project" + ], + "description": "Update the OAuth2 server (OIDC provider) configuration.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Server", + "group": null, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-server.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": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the OAuth2 server.", + "x-example": false + }, + "authorizationUrl": { + "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", + "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 + }, + "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" + }, + "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": { "patch": { "summary": "Update project OAuth2 Amazon", @@ -51896,7 +53464,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -52062,7 +53633,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -52228,7 +53802,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -52394,7 +53971,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -52560,7 +54140,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53180,6 +54763,11 @@ "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 } } } @@ -53403,6 +54991,95 @@ } } }, + "\/project\/policies\/password-strength": { + "patch": { + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", + "tags": [ + "project" + ], + "description": "Update the password strength requirements for users in the project.", + "responses": { + "200": { + "description": "Policy Password Strength", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordStrengthPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "project\/update-password-strength-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": [] + } + }, + "security": [ + { + "Project": [], + "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 + } + } + } + } + } + } + } + }, "\/project\/policies\/session-alert": { "patch": { "summary": "Update session alert policy", @@ -53773,7 +55450,7 @@ "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", "responses": { "200": { - "description": "Policy Password Dictionary, or Policy Password History, 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", + "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", "content": { "application\/json": { "schema": { @@ -53784,6 +55461,9 @@ { "$ref": "#\/components\/schemas\/policyPasswordHistory" }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, { "$ref": "#\/components\/schemas\/policyPasswordPersonalData" }, @@ -53804,6 +55484,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -53811,13 +55500,17 @@ "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" + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail" } } } @@ -53858,7 +55551,7 @@ "parameters": [ { "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "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.", "required": true, "schema": { "type": "string", @@ -53866,13 +55559,17 @@ "enum": [ "password-dictionary", "password-history", + "password-strength", "password-personal-data", "session-alert", "session-duration", "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "x-enum-name": "ProjectPolicyId" }, @@ -54017,7 +55714,7 @@ "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", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, documentsDB, tablesDB, vectorsDB, locale, health, project, storage, teams, users, vcs, webhooks, tokens, presences, sites, functions, proxy, graphql, migrations, messaging, advisor", "required": true, "schema": { "type": "string", @@ -54027,6 +55724,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -54034,6 +55734,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -54143,7 +55846,8 @@ "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": "", + "x-example": "password", + "format": "password", "x-nullable": true }, "senderEmail": { @@ -55024,7 +56728,10 @@ "variableId": { "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -56010,7 +57717,7 @@ "enum": [ "active" ], - "x-enum-name": "ProjectStatus" + "x-enum-name": "Status" } }, "required": [ @@ -56326,7 +58033,7 @@ }, "\/proxy\/rules\/redirect": { "post": { - "summary": "Create Redirect rule", + "summary": "Create redirect rule", "operationId": "proxyCreateRedirectRule", "tags": [ "proxy" @@ -56398,7 +58105,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -57182,7 +58889,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -57210,7 +58920,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -57355,7 +59065,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -57365,7 +59075,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "installationId": { "type": "string", @@ -57622,7 +59332,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "default": [] }, @@ -57960,7 +59670,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -58105,7 +59815,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -58115,7 +59825,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "fallbackFile": { "type": "string", @@ -58991,14 +60701,16 @@ "packaging": false, "public": true, "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -59562,7 +61274,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -59965,7 +61680,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -60484,7 +62202,10 @@ "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-upload-id": true, + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "file": { "type": "string", @@ -60788,7 +62509,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -60796,7 +62518,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -60868,7 +62591,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -60876,7 +62600,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -61095,7 +62820,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -61103,7 +62829,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -61437,7 +63164,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -62379,7 +64109,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -63405,7 +65138,7 @@ }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { - "summary": "Update dateTime column", + "summary": "Update datetime column", "operationId": "tablesDBUpdateDatetimeColumn", "tags": [ "tablesDB" @@ -68194,7 +69927,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -69757,7 +71493,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -71233,7 +72972,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -71443,7 +73182,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -71463,7 +73205,8 @@ "type": "string", "description": "Plain text user password. Must be at least 8 chars.", "default": "", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -71538,7 +73281,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -71627,7 +73373,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -71858,7 +73607,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -71947,7 +73699,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72036,7 +73791,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72159,7 +73917,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72266,7 +74027,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -73901,7 +75665,8 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -74268,6 +76033,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -74510,7 +76278,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74594,7 +76362,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74633,7 +76401,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "providerType": { "type": "string", @@ -74705,7 +76476,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74775,7 +76546,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74867,7 +76638,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -76129,7 +77900,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -76141,6 +77915,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -76155,7 +77935,7 @@ }, "\/vectorsdb\/embeddings\/text": { "post": { - "summary": "Create Text Embeddings", + "summary": "Create text embeddings", "operationId": "vectorsDBCreateTextEmbeddings", "tags": [ "vectorsDB" @@ -76246,10 +78026,13 @@ "model": { "type": "string", "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", "enum": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ], "x-enum-name": "EmbeddingModel" } @@ -77157,7 +78940,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -77715,7 +79501,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -78293,6 +80082,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -79251,7 +81043,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "url": { "type": "string", @@ -79293,7 +81088,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "secret": { "type": "string", @@ -79478,7 +81274,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" } }, "required": [ @@ -79640,6 +81437,18 @@ "name": "tablesdb", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, + { + "name": "documentsDB", + "description": "The DocumentsDB 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": "vectorsDB", + "description": "The VectorsDB service allows you to create vector collections, embeddings, indexes, and documents." + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -79668,6 +81477,18 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to configure event-driven HTTP callbacks for your project." + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for project resources." + }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -79688,6 +81509,14 @@ "name": "console", "description": "The Console service allows you to interact with console relevant information." }, + { + "name": "assistant", + "description": "The Assistant service allows Console users to ask assistant queries." + }, + { + "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." @@ -80888,7 +82717,7 @@ "total": { "type": "integer", "description": "Total number of policies in the given project.", - "x-example": 9, + "x-example": 10, "format": "int32" }, "policies": { @@ -80902,6 +82731,9 @@ { "$ref": "#\/components\/schemas\/policyPasswordHistory" }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, { "$ref": "#\/components\/schemas\/policyPasswordPersonalData" }, @@ -80922,6 +82754,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -80929,13 +82770,17 @@ "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" + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail" } } }, @@ -80947,7 +82792,7 @@ "policies" ], "example": { - "total": 9, + "total": 10, "policies": "" } }, @@ -81540,7 +83385,7 @@ "model": { "type": "string", "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" + "x-example": "nomic-embed-text" }, "dimension": { "type": "integer", @@ -81574,7 +83419,7 @@ "error" ], "example": { - "model": "embeddinggemma", + "model": "nomic-embed-text", "dimension": 768, "embedding": [ 0.01, @@ -86830,10 +88675,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -86852,7 +88703,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -87138,6 +88992,36 @@ "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.", @@ -87220,6 +89104,11 @@ "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": { @@ -88325,6 +90214,11 @@ "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", @@ -88350,6 +90244,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -88366,6 +90261,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -90457,6 +92353,11 @@ "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.", @@ -90509,7 +92410,8 @@ "smtpPassword": { "type": "string", "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" + "x-example": "smtp-password", + "format": "password" }, "smtpSecure": { "type": "string", @@ -90566,10 +92468,18 @@ }, "x-example": {} }, - "region": { + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "$ref": "#\/components\/schemas\/block" + }, + "x-example": "" + }, + "consoleAccessedAt": { "type": "string", - "description": "Project region", - "x-example": "fra" + "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" }, "billingLimits": { "type": "object", @@ -90580,18 +92490,92 @@ }, "nullable": true }, - "blocks": { + "oAuth2ServerEnabled": { + "type": "boolean", + "description": "OAuth2 server status", + "x-example": false + }, + "oAuth2ServerAuthorizationUrl": { + "type": "string", + "description": "OAuth2 server authorization URL", + "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration" + }, + "oAuth2ServerScopes": { "type": "array", - "description": "Project blocks information", + "description": "OAuth2 server allowed scopes", "items": { - "$ref": "#\/components\/schemas\/block" + "type": "string" }, - "x-example": "" + "x-example": [ + "read", + "write" + ] }, - "consoleAccessedAt": { + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "x-example": [ + "calendar" + ] + }, + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "x-example": 86400, + "format": "int32" + }, + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 2592000, + "format": "int32" + }, + "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 + }, + "oAuth2ServerVerificationUrl": { "type": "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" + "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" + }, + "oAuth2ServerUserCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "x-example": 8, + "format": "int32" + }, + "oAuth2ServerUserCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "x-example": "alphanumeric" + }, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "x-example": 600, + "format": "int32" + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -90600,6 +92584,7 @@ "$updatedAt", "name", "teamId", + "region", "devKeys", "smtpEnabled", "smtpSenderName", @@ -90618,9 +92603,22 @@ "authMethods", "services", "protocols", - "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAuthorizationDetailsTypes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerVerificationUrl", + "oAuth2ServerUserCodeLength", + "oAuth2ServerUserCodeFormat", + "oAuth2ServerDeviceCodeDuration", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -90628,6 +92626,7 @@ "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "New Project", "teamId": "1592981250", + "region": "fra", "devKeys": {}, "smtpEnabled": false, "smtpSenderName": "John Appwrite", @@ -90637,7 +92636,7 @@ "smtpHost": "mail.appwrite.io", "smtpPort": 25, "smtpUsername": "emailuser", - "smtpPassword": "", + "smtpPassword": "smtp-password", "smtpSecure": "tls", "pingCount": 1, "pingedAt": "2020-10-15T06:38:00.000+00:00", @@ -90648,10 +92647,28 @@ "authMethods": {}, "services": {}, "protocols": {}, - "region": "fra", - "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "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" } }, "projectAuthMethod": { @@ -90701,6 +92718,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -90708,6 +92728,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -90816,7 +92839,8 @@ "authPassword": { "type": "string", "description": "HTTP basic authentication password.", - "x-example": "password" + "x-example": "webhook-password", + "format": "password" }, "secret": { "type": "string", @@ -90867,7 +92891,7 @@ ], "tls": true, "authUsername": "username", - "authPassword": "password", + "authPassword": "webhook-password", "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", @@ -93028,6 +95052,59 @@ "total": 5 } }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "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": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": true + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": true + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": true + } + }, + "required": [ + "$id", + "min", + "uppercase", + "lowercase", + "number", + "symbols" + ], + "example": { + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true + } + }, "policyPasswordPersonalData": { "description": "Policy Password Personal Data", "type": "object", @@ -93208,6 +95285,11 @@ "type": "boolean", "description": "Whether user MFA status is visible in memberships.", "x-example": true + }, + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "x-example": true } }, "required": [ @@ -93216,7 +95298,8 @@ "userEmail", "userPhone", "userName", - "userMFA" + "userMFA", + "userAccessedAt" ], "example": { "$id": "password-dictionary", @@ -93224,7 +95307,8 @@ "userEmail": true, "userPhone": true, "userName": true, - "userMFA": true + "userMFA": true, + "userAccessedAt": true } }, "platformWeb": { @@ -97881,6 +99965,72 @@ "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": "int32" + }, + "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" + }, + "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.", @@ -97922,6 +100072,12 @@ "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.", @@ -97938,6 +100094,17 @@ "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", @@ -97945,6 +100112,7 @@ "message", "size", "version", + "oauth2-provider", "backup-policy" ], "example": { @@ -97956,6 +100124,17 @@ "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, @@ -97963,6 +100142,7 @@ "message": 50, "size": 30000, "version": "1.4.0", + "oauth2-provider": 5, "backup-policy": 5 } }, @@ -98352,66 +100532,6 @@ "description": "Hostname.", "x-example": "appwrite.io" }, - "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.", @@ -98442,18 +100562,6 @@ "projectId", "teamId", "hostname", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", "countryCode", "countryName" ], @@ -98476,18 +100584,6 @@ "projectId": "610fc2f985ee0", "teamId": "610fc2f985ee0", "hostname": "appwrite.io", - "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" } @@ -99101,65 +101197,6 @@ "resourceType": "database" } }, - "dedicatedDatabaseAuditLog": { - "description": "AuditLog", - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "description": "When the event occurred.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "user": { - "type": "string", - "description": "Database user that performed the action.", - "x-example": "appwrite" - }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" - }, - "action": { - "type": "string", - "description": "The action performed (e.g., CREATE TABLE, DROP INDEX).", - "x-example": "CREATE TABLE" - }, - "object": { - "type": "string", - "description": "The database object affected.", - "x-example": "public.users" - }, - "statement": { - "type": "string", - "description": "The full SQL statement.", - "x-example": "CREATE TABLE users (id serial PRIMARY KEY)" - }, - "clientAddress": { - "type": "string", - "description": "Client IP address.", - "x-example": "192.168.1.100" - } - }, - "required": [ - "timestamp", - "user", - "database", - "action", - "object", - "statement", - "clientAddress" - ], - "example": { - "timestamp": "2020-10-15T06:38:00.000+00:00", - "user": "appwrite", - "database": "appwrite", - "action": "CREATE TABLE", - "object": "public.users", - "statement": "CREATE TABLE users (id serial PRIMARY KEY)", - "clientAddress": "192.168.1.100" - } - }, "dedicatedDatabaseBackup": { "description": "Backup", "type": "object", @@ -99184,6 +101221,16 @@ "description": "Project ID.", "x-example": "5e5ea5c16897e" }, + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" + }, "type": { "type": "string", "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", @@ -99231,6 +101278,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -99245,6 +101294,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -99774,6 +101825,11 @@ "description": "Does plan support blocking free email addresses.", "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.", @@ -99898,6 +101954,7 @@ "supportsDisposableEmailValidation", "supportsCanonicalEmailValidation", "supportsFreeEmailValidation", + "supportsProjectSpecificRoles", "backupsEnabled", "usagePerProject", "supportedAddons", @@ -99961,6 +102018,7 @@ "supportsDisposableEmailValidation": true, "supportsCanonicalEmailValidation": true, "supportsFreeEmailValidation": true, + "supportsProjectSpecificRoles": true, "backupsEnabled": true, "usagePerProject": true, "supportedAddons": null, @@ -100229,7 +102287,7 @@ "branchId": { "type": "string", "description": "Branch identifier.", - "x-example": "branch-a1b2c3d4" + "x-example": "a1b2c3d4" }, "branchName": { "type": "string", @@ -100239,26 +102297,83 @@ "namespace": { "type": "string", "description": "Kubernetes namespace where the branch is deployed.", - "x-example": "branch-a1b2c3d4" + "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.", + "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 SSL is required.", + "x-example": false + }, + "engine": { + "type": "string", + "description": "Database engine. Possible values: postgres, mysql, mariadb, mongodb.", + "x-example": "postgres" + }, + "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" + "expiresAt", + "host", + "port", + "database", + "username", + "password", + "ssl", + "engine", + "connectionString" ], "example": { - "branchId": "branch-a1b2c3d4", + "branchId": "a1b2c3d4", "branchName": "branch-a1b2c3d4", - "namespace": "branch-a1b2c3d4", - "expiresAt": 1711411200 + "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": { @@ -100503,7 +102618,7 @@ "host": { "type": "string", "description": "Database hostname.", - "x-example": "db-myproject-mydb.fra.appwrite.network" + "x-example": "db-myproject-mydb.fra.appwrite.center" }, "port": { "type": "integer", @@ -100526,6 +102641,22 @@ "description": "Database name.", "x-example": "appwrite" }, + "tcpHost": { + "type": "string", + "description": "Database TCP hostname or address.", + "x-example": "db-myproject-mydb.fra.appwrite.center" + }, + "tcpPort": { + "type": "integer", + "description": "Database TCP port.", + "x-example": 5432, + "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.", @@ -100534,12 +102665,12 @@ "ssl": { "type": "boolean", "description": "Whether SSL is required.", - "x-example": true + "x-example": false }, "connectionString": { "type": "string", "description": "Full connection string.", - "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.network:5432\/appwrite?sslmode=require" + "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" } }, "required": [ @@ -100549,20 +102680,26 @@ "username", "password", "database", + "tcpHost", + "tcpPort", + "tcpDatabase", "engine", "ssl", "connectionString" ], "example": { "$id": "5e5ea5c16897e", - "host": "db-myproject-mydb.fra.appwrite.network", + "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": true, - "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.network:5432\/appwrite?sslmode=require" + "ssl": false, + "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" } }, "credit": { @@ -100715,103 +102852,6 @@ "available": 5 } }, - "dedicatedDatabaseMetrics": { - "description": "DatabaseMetrics", - "type": "object", - "properties": { - "period": { - "type": "string", - "description": "Metrics aggregation period. Possible values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", - "x-example": "24h" - }, - "cpuPercent": { - "type": "number", - "description": "Average CPU usage percentage.", - "x-example": 45.2, - "format": "double" - }, - "memoryPercent": { - "type": "number", - "description": "Average memory usage percentage.", - "x-example": 62.1, - "format": "double" - }, - "memoryUsedBytes": { - "type": "integer", - "description": "Memory used in bytes.", - "x-example": 536870912, - "format": "int32" - }, - "memoryMaxBytes": { - "type": "integer", - "description": "Maximum memory available in bytes.", - "x-example": 1073741824, - "format": "int32" - }, - "storageUsedBytes": { - "type": "integer", - "description": "Storage used in bytes.", - "x-example": 1073741824, - "format": "int32" - }, - "connectionsActive": { - "type": "integer", - "description": "Current active connections.", - "x-example": 15, - "format": "int32" - }, - "connectionsMax": { - "type": "integer", - "description": "Maximum connections configured.", - "x-example": 100, - "format": "int32" - }, - "iopsRead": { - "type": "number", - "description": "Average read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWrite": { - "type": "number", - "description": "Average write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "qps": { - "type": "number", - "description": "Queries per second.", - "x-example": 230.7, - "format": "double" - } - }, - "required": [ - "period", - "cpuPercent", - "memoryPercent", - "memoryUsedBytes", - "memoryMaxBytes", - "storageUsedBytes", - "connectionsActive", - "connectionsMax", - "iopsRead", - "iopsWrite", - "qps" - ], - "example": { - "period": "24h", - "cpuPercent": 45.2, - "memoryPercent": 62.1, - "memoryUsedBytes": 536870912, - "memoryMaxBytes": 1073741824, - "storageUsedBytes": 1073741824, - "connectionsActive": 15, - "connectionsMax": 100, - "iopsRead": 125.5, - "iopsWrite": 45.3, - "qps": 230.7 - } - }, "dedicatedDatabase": { "description": "DedicatedDatabase", "type": "object", @@ -100846,6 +102886,11 @@ "description": "Database type: shared (serverless) or dedicated (always-on).", "x-example": "dedicated" }, + "api": { + "type": "string", + "description": "Product API that owns this database: compute, documentsdb, or vectorsdb.", + "x-example": "compute" + }, "region": { "type": "string", "description": "Region identifier (e.g., fra, nyc, syd).", @@ -100864,7 +102909,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -100874,7 +102919,7 @@ "hostname": { "type": "string", "description": "Database hostname for connections.", - "x-example": "db-myproject-mydb.fra.appwrite.network" + "x-example": "db-myproject-mydb.fra.appwrite.center" }, "connectionPort": { "type": "integer", @@ -100895,7 +102940,7 @@ "connectionString": { "type": "string", "description": "Full database connection string (URI format).", - "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.network:5432\/postgres" + "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres" }, "status": { "type": "string", @@ -101054,7 +103099,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -101100,6 +103145,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -101152,16 +103198,17 @@ "projectId": "5e5ea5c16897e", "name": "My Production Database", "type": "dedicated", + "api": "compute", "region": "fra", "engine": "postgres", "version": "16", - "specification": "starter", + "specification": "s-2vcpu-2gb", "backend": "edge", - "hostname": "db-myproject-mydb.fra.appwrite.network", + "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.network:5432\/postgres", + "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", @@ -101192,7 +103239,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -103098,149 +105145,6 @@ "failed": false } }, - "dedicatedDatabasePerformanceInsights": { - "description": "PerformanceInsights", - "type": "object", - "properties": { - "topQueries": { - "type": "array", - "description": "Top queries by total execution time.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePerformanceInsightsQuery" - }, - "x-example": [] - }, - "waitEvents": { - "type": "array", - "description": "Active wait events.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePerformanceInsightsWaitEvent" - }, - "x-example": [] - }, - "totalCalls": { - "type": "integer", - "description": "Total number of query calls.", - "x-example": 150000, - "format": "int32" - }, - "totalTimeMs": { - "type": "number", - "description": "Total query execution time in milliseconds.", - "x-example": 85432.12, - "format": "double" - }, - "avgTimeMs": { - "type": "number", - "description": "Average query execution time in milliseconds.", - "x-example": 0.57, - "format": "double" - } - }, - "required": [ - "topQueries", - "waitEvents", - "totalCalls", - "totalTimeMs", - "avgTimeMs" - ], - "example": { - "topQueries": [], - "waitEvents": [], - "totalCalls": 150000, - "totalTimeMs": 85432.12, - "avgTimeMs": 0.57 - } - }, - "dedicatedDatabasePerformanceInsightsQuery": { - "description": "PerformanceInsightsQuery", - "type": "object", - "properties": { - "query": { - "type": "string", - "description": "The SQL query text.", - "x-example": "SELECT * FROM users WHERE email = $1" - }, - "calls": { - "type": "integer", - "description": "Number of times this query has been executed.", - "x-example": 42, - "format": "int32" - }, - "totalTimeMs": { - "type": "number", - "description": "Total execution time in milliseconds.", - "x-example": 1523.4, - "format": "double" - }, - "meanTimeMs": { - "type": "number", - "description": "Mean execution time in milliseconds.", - "x-example": 36.27, - "format": "double" - }, - "rows": { - "type": "integer", - "description": "Total rows returned or affected.", - "x-example": 1250, - "format": "int32" - } - }, - "required": [ - "query", - "calls", - "totalTimeMs", - "meanTimeMs", - "rows" - ], - "example": { - "query": "SELECT * FROM users WHERE email = $1", - "calls": 42, - "totalTimeMs": 1523.4, - "meanTimeMs": 36.27, - "rows": 1250 - } - }, - "dedicatedDatabasePerformanceInsightsWaitEvent": { - "description": "PerformanceInsightsWaitEvent", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Wait event name.", - "x-example": "DataFileRead" - }, - "type": { - "type": "string", - "description": "Wait event type or category.", - "x-example": "IO" - }, - "count": { - "type": "integer", - "description": "Number of occurrences.", - "x-example": 15, - "format": "int32" - }, - "totalWaitMs": { - "type": "number", - "description": "Total wait time in milliseconds.", - "x-example": 234.5, - "format": "double" - } - }, - "required": [ - "event", - "type", - "count", - "totalWaitMs" - ], - "example": { - "event": "DataFileRead", - "type": "IO", - "count": 15, - "totalWaitMs": 234.5 - } - }, "dedicatedDatabasePITRWindows": { "description": "PITRWindows", "type": "object", @@ -103631,6 +105535,78 @@ "enabled": true } }, + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, "dedicatedDatabasePooler": { "description": "PoolerConfig", "type": "object", @@ -104172,6 +106148,181 @@ "database": "appwrite" } }, + "dedicatedDatabaseSpecification": { + "description": "Specification", + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Specification slug. Use this value when creating a dedicated database.", + "x-example": "s-2vcpu-2gb" + }, + "name": { + "type": "string", + "description": "Human readable specification name.", + "x-example": "Standard" + }, + "price": { + "type": "number", + "description": "Monthly price of the specification in USD.", + "x-example": 23, + "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" + }, + "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": [ + "slug", + "name", + "price", + "cpu", + "memory", + "maxConnections", + "includedStorage", + "includedBandwidth", + "enabled" + ], + "example": { + "slug": "s-2vcpu-2gb", + "name": "Standard", + "price": 23, + "cpu": 2000, + "memory": 2048, + "maxConnections": 200, + "includedStorage": 25, + "includedBandwidth": 200, + "enabled": true + } + }, + "dedicatedDatabaseSpecificationList": { + "description": "SpecificationList", + "type": "object", + "properties": { + "specifications": { + "type": "array", + "description": "List of dedicated database specifications.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecification" + }, + "x-example": [] + }, + "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, + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationPricing" + } + } + }, + "required": [ + "specifications", + "total", + "pricing" + ], + "example": { + "specifications": [], + "total": 9, + "pricing": null + } + }, + "dedicatedDatabaseSpecificationPricing": { + "description": "SpecificationPricing", + "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" + }, + "haReplicaRate": { + "type": "number", + "description": "High availability replica price as a fraction of the specification cost.", + "x-example": 0.5, + "format": "double" + }, + "crossRegionReplicaRate": { + "type": "number", + "description": "Cross-region replica price as a fraction of the specification cost.", + "x-example": 0.75, + "format": "double" + }, + "crossRegionRate": { + "type": "number", + "description": "Cross-region transfer price as a fraction of the specification cost.", + "x-example": 0.5, + "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": [ + "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", @@ -104396,260 +106547,6 @@ "credits": null } }, - "dedicatedDatabaseUsage": { - "description": "DedicatedDatabase", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "provisionedCpu": { - "type": "number", - "description": "Provisioned CPU cores for the database specification.", - "x-example": 2, - "format": "double" - }, - "provisionedMemoryBytes": { - "type": "integer", - "description": "Provisioned memory in bytes for the database specification.", - "x-example": 4294967296, - "format": "int32" - }, - "provisionedStorageBytes": { - "type": "integer", - "description": "Provisioned storage in bytes for the database specification.", - "x-example": 107374182400, - "format": "int32" - }, - "provisionedConnections": { - "type": "integer", - "description": "Maximum concurrent connections allowed by the database specification.", - "x-example": 200, - "format": "int32" - }, - "computeTotal": { - "type": "integer", - "description": "Total aggregated compute time in milliseconds.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "connectionsTotal": { - "type": "integer", - "description": "Total aggregated number of database connections.", - "x-example": 0, - "format": "int32" - }, - "coldStartsTotal": { - "type": "integer", - "description": "Total aggregated number of cold starts.", - "x-example": 0, - "format": "int32" - }, - "cpuTotal": { - "type": "number", - "description": "Latest CPU usage percent (0-100).", - "x-example": 45.2, - "format": "double" - }, - "memoryTotal": { - "type": "number", - "description": "Latest memory usage percent (0-100).", - "x-example": 62.1, - "format": "double" - }, - "qpsTotal": { - "type": "number", - "description": "Latest queries per second.", - "x-example": 230.7, - "format": "double" - }, - "iopsReadTotal": { - "type": "number", - "description": "Latest read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWriteTotal": { - "type": "number", - "description": "Latest write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "compute": { - "type": "array", - "description": "Aggregated compute time per period in milliseconds.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "inbound": { - "type": "array", - "description": "Aggregated inbound network traffic per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "outbound": { - "type": "array", - "description": "Aggregated outbound network traffic per period in bytes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "connections": { - "type": "array", - "description": "Aggregated number of database connections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "coldStarts": { - "type": "array", - "description": "Aggregated number of cold starts per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "cpu": { - "type": "array", - "description": "CPU usage percent per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "memory": { - "type": "array", - "description": "Memory usage percent per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "qps": { - "type": "array", - "description": "Queries per second per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "iopsRead": { - "type": "array", - "description": "Read IOPS per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "iopsWrite": { - "type": "array", - "description": "Write IOPS per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "range", - "provisionedCpu", - "provisionedMemoryBytes", - "provisionedStorageBytes", - "provisionedConnections", - "computeTotal", - "storageTotal", - "inboundTotal", - "outboundTotal", - "connectionsTotal", - "coldStartsTotal", - "cpuTotal", - "memoryTotal", - "qpsTotal", - "iopsReadTotal", - "iopsWriteTotal", - "compute", - "storage", - "inbound", - "outbound", - "connections", - "coldStarts", - "cpu", - "memory", - "qps", - "iopsRead", - "iopsWrite" - ], - "example": { - "$id": "5e5ea5c16897e", - "range": "30d", - "provisionedCpu": 2, - "provisionedMemoryBytes": 4294967296, - "provisionedStorageBytes": 107374182400, - "provisionedConnections": 200, - "computeTotal": 0, - "storageTotal": 0, - "inboundTotal": 0, - "outboundTotal": 0, - "connectionsTotal": 0, - "coldStartsTotal": 0, - "cpuTotal": 45.2, - "memoryTotal": 62.1, - "qpsTotal": 230.7, - "iopsReadTotal": 125.5, - "iopsWriteTotal": 45.3, - "compute": [], - "storage": [], - "inbound": [], - "outbound": [], - "connections": [], - "coldStarts": [], - "cpu": [], - "memory": [], - "qps": [], - "iopsRead": [], - "iopsWrite": [] - } - }, "usageEvent": { "description": "usageEvent", "type": "object", @@ -104750,17 +106647,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "usageOrganization": { @@ -105297,6 +107208,249 @@ "resourceId": "" } }, + "app": { + "description": "App", + "type": "object", + "properties": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "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" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "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" + }, + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] + } + }, + "appSecret": { + "description": "AppSecret", + "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": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + }, + "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", + "$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": "$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" + } + }, + "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": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked 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": [ + "$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" + } + }, "activityEventList": { "description": "Activity event list", "type": "object", @@ -105577,34 +107731,6 @@ "blocks": "" } }, - "dedicatedDatabaseAuditLogList": { - "description": "Dedicated database audit logs list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of auditLogs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "auditLogs": { - "type": "array", - "description": "List of auditLogs.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseAuditLog" - }, - "x-example": "" - } - }, - "required": [ - "total", - "auditLogs" - ], - "example": { - "total": 5, - "auditLogs": "" - } - }, "dedicatedDatabaseConnectionList": { "description": "Dedicated database connections list", "type": "object", @@ -105912,6 +108038,62 @@ "total": 5, "gauges": "" } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "$ref": "#\/components\/schemas\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" + } } }, "securitySchemes": { @@ -105924,6 +108106,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "Key": { "type": "apiKey", "name": "X-Appwrite-Key", diff --git a/specs/latest/open-api3-latest-server.json b/specs/latest/open-api3-latest-server.json index bf8af1f85..f589b3f63 100644 --- a/specs/latest/open-api3-latest-server.json +++ b/specs/latest/open-api3-latest-server.json @@ -143,7 +143,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -154,7 +157,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -1819,11 +1823,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -2192,7 +2197,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -2500,7 +2506,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2582,7 +2591,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2660,7 +2672,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2978,7 +2993,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3066,7 +3084,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3302,7 +3323,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -3840,30 +3864,37 @@ ] } }, - "\/avatars\/browsers\/{code}": { + "\/apps": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "List Applications", + "operationId": "appsList", "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": "List applications.", "responses": { "200": { - "description": "Image" + "description": "Apps list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appsList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", + "method": "list", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", + "type": "", + "demo": "apps\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -3872,7 +3903,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [], "Session": [] @@ -3888,111 +3918,176 @@ ], "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.", + "name": "queries", + "description": "Array of query strings generated using the Query 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" } ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + } + } } }, - "\/avatars\/credit-cards\/{code}": { + "\/apps\/{appId}": { "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + "summary": "Get Application", + "operationId": "appsGet", "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 application by its unique ID.", "responses": { "200": { - "description": "Image" + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", + "method": "get", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", + "type": "", + "demo": "apps\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4001,7 +4096,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [], "Session": [] @@ -4017,117 +4111,216 @@ ], "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" - }, + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ { - "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" - }, + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "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" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/favicon": { + "\/apps\/{appId}\/secrets": { "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + "summary": "List Secrets", + "operationId": "appsListSecrets", "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": "List client secrets for an application.", "responses": { "200": { - "description": "Image" + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", + "method": "listSecrets", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", + "type": "", + "demo": "apps\/list-secrets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4136,7 +4329,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [], "Session": [] @@ -4152,43 +4344,71 @@ ], "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": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "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": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image" + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "getFlag", + "method": "createSecret", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", + "type": "", + "demo": "apps\/create-secret.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.write", "platforms": [ "console", "client", @@ -4197,7 +4417,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { "Project": [], "Session": [] @@ -4213,18 +4432,698 @@ ], "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", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server", + "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": "" + }, + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": "" + }, + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": "" + }, + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server", + "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": "" + }, + "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" + } + }, + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "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" + } + }, + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "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" + } + }, + "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", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "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" + } + }, + "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", + "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", @@ -4691,7 +5590,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4699,7 +5599,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4776,7 +5677,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4784,7 +5686,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4871,7 +5774,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4879,7 +5783,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4966,7 +5871,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4974,7 +5880,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5802,6 +6709,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -5934,6 +6842,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -6069,7 +6980,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -6088,6 +7002,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6345,6 +7260,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -6423,6 +7341,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6433,7 +7352,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "newResourceName": { "type": "string", @@ -6796,7 +7718,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -7738,7 +8663,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -13047,7 +13975,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -13665,6 +14596,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -14722,7 +15656,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -14734,6 +15671,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -15555,7 +16498,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -16132,7 +17078,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -17741,7 +18690,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -17848,7 +18800,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -18003,9 +18955,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -18421,7 +19376,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -18576,9 +19531,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -19460,14 +20418,16 @@ "public": true, "auth": { "Project": [], - "Key": [] + "Key": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -19685,7 +20645,7 @@ "201": { "description": "Execution", "content": { - "multipart\/form-data": { + "application\/json": { "schema": { "$ref": "#\/components\/schemas\/execution" } @@ -20097,7 +21057,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -20573,6 +21536,57 @@ ] } }, + "\/health\/audits-db": { + "get": { + "summary": "Get audits DB", + "operationId": "healthGetAuditsDB", + "tags": [ + "health" + ], + "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", + "responses": { + "200": { + "description": "Status List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/healthStatusList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuditsDB", + "group": null, + "cookies": false, + "type": "", + "demo": "health\/get-audits-db.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\/health\/get-audits-db.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, "\/health\/cache": { "get": { "summary": "Get cache", @@ -22855,7 +23869,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "subject": { "type": "string", @@ -23169,7 +24186,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "title": { "type": "string", @@ -23633,7 +24653,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "content": { "type": "string", @@ -24392,7 +25415,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -24758,7 +25784,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25002,7 +26031,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25257,7 +26289,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25461,7 +26496,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25692,7 +26730,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25865,6 +26906,264 @@ } } }, + "\/messaging\/providers\/ses": { + "post": { + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Amazon SES provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSesProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-ses-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-ses-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "" + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "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\/ses\/{providerId}": { + "patch": { + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", + "tags": [ + "messaging" + ], + "description": "Update an Amazon SES provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSesProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-ses-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-ses-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "" + } + } + } + } + } + } + } + }, "\/messaging\/providers\/smtp": { "post": { "summary": "Create SMTP provider", @@ -26011,7 +27310,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -26040,7 +27342,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -26289,7 +27592,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -26410,7 +27714,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -26615,7 +27922,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -26820,7 +28130,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27025,7 +28338,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27607,7 +28923,10 @@ "topicId": { "type": "string", "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27783,15 +29102,420 @@ } } } - } + } + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", + "tags": [ + "messaging" + ], + "description": "Delete a topic by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "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": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "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", + "cookies": false, + "type": "", + "demo": "messaging\/list-topic-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic 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" + }, + { + "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", + "tags": [ + "messaging" + ], + "description": "Get a list of all subscribers from the current Appwrite project.", + "responses": { + "200": { + "description": "Subscriber list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriberList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSubscribers", + "group": "subscribers", + "cookies": false, + "type": "", + "demo": "messaging\/list-subscribers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "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: 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": "", + "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", + "tags": [ + "messaging" + ], + "description": "Create a new subscriber.", + "responses": { + "201": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriber", + "group": "subscribers", + "cookies": false, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "" + } + }, + "required": [ + "subscriberId", + "targetId" + ] + } + } + } + } + } + }, + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "get": { + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", + "tags": [ + "messaging" + ], + "description": "Get a subscriber by its unique ID.\n", + "responses": { + "200": { + "description": "Subscriber", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/subscriber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriber", + "group": "subscribers", + "cookies": false, + "type": "", + "demo": "messaging\/get-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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" + } + ] }, "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", "tags": [ "messaging" ], - "description": "Delete a topic by its unique ID.", + "description": "Delete a subscriber by its unique ID.", "responses": { "204": { "description": "No content" @@ -27799,62 +29523,76 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteTopic", - "group": "topics", + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "messaging\/delete-topic.md", + "demo": "messaging\/delete-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "subscribers.write", "platforms": [ + "server", + "client", "console", "server" ], "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\/messaging\/delete-subscriber.md", "auth": { "Project": [], - "Key": [] + "JWT": [] } }, "security": [ { "Project": [], + "JWT": [], + "Session": [], "Key": [] } ], "parameters": [ { "name": "topicId", - "description": "Topic ID.", + "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" } ] } }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "tags": [ - "messaging" + "oauth2" ], - "description": "Get the topic activity logs listed 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": "Logs List", + "description": "OAuth2 Approve", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/oauth2Approve" } } } @@ -27862,86 +29600,87 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", + "method": "approve", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/list-topic-logs.md", + "demo": "oauth2\/approve.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "oauth2.write", "platforms": [ - "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "auth": { - "Project": [], - "Key": [] + "ProjectQuery": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectQuery": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "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). 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": { + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, - "\/messaging\/topics\/{topicId}\/subscribers": { + "\/oauth2\/{project_id}\/authorize": { "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", "tags": [ - "messaging" + "oauth2" ], - "description": "Get a list of all subscribers from the current Appwrite 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.", "responses": { "200": { - "description": "Subscriber list", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriberList" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -27949,95 +29688,180 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", + "method": "authorize", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/list-subscribers.md", + "demo": "oauth2\/authorize.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "public", "platforms": [ - "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "auth": { - "Project": [], - "Key": [] + "ProjectQuery": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectQuery": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "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: targetId, topicId, userId, providerType", + "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": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "", + "default": "" }, "in": "query" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", + "name": "nonce", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "", "default": "" }, "in": "query" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "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" } ] - }, + } + }, + "\/oauth2\/{project_id}\/grants": { "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new subscriber.", + "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": "Subscriber", + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -28045,45 +29869,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "createGrant", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ - "server", "client", - "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [], - "JWT": [] + "Session": [] } }, "security": [ { "Project": [], - "JWT": [], "Session": [], - "Key": [] + "JWT": [] } ], "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" } @@ -28094,20 +29914,14 @@ "schema": { "type": "object", "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" - }, - "targetId": { + "user_code": { "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "" + "description": "User code displayed on the device.", + "x-example": "" } }, "required": [ - "subscriberId", - "targetId" + "user_code" ] } } @@ -28115,21 +29929,21 @@ } } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "\/oauth2\/{project_id}\/grants\/{grant_id}": { "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", "tags": [ - "messaging" + "oauth2" ], - "description": "Get a subscriber by its unique ID.\n", + "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": "Subscriber", + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -28137,123 +29951,139 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", + "method": "getGrant", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/get-subscriber.md", + "demo": "oauth2\/get-grant.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "oauth2.read", "platforms": [ - "console", + "client", + "server", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + } + }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", "tags": [ - "messaging" + "oauth2" ], - "description": "Delete a subscriber by its unique ID.", + "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": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2 Reject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Reject" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", + "method": "reject", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/delete-subscriber.md", + "demo": "oauth2\/reject.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "oauth2.write", "platforms": [ - "server", "client", - "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { - "Project": [], - "JWT": [] + "ProjectQuery": [], + "Session": [] } }, "security": [ { - "Project": [], - "JWT": [], + "ProjectQuery": [], "Session": [], - "Key": [] + "JWT": [] } ], "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.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "required": true, "schema": { "type": "string", - "x-example": "" + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, "\/organization\/keys": { @@ -28387,7 +30217,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -29215,7 +31048,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29352,14 +31186,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -29386,7 +31221,7 @@ } ], "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-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -29832,7 +31667,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -29936,9 +31774,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30114,9 +31955,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30367,9 +32211,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30729,21 +32576,157 @@ "in": "path" } ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "tags": [ + "project" + ], + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "responses": { + "200": { + "description": "Mock Number", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/mockNumber" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMockPhone", + "group": "mocks", + "cookies": false, + "type": "", + "demo": "project\/update-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" + } + ], + "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": "" + } + }, + "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", "tags": [ "project" ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "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": "Mock Number", + "description": "OAuth2 Providers List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mockNumber" + "$ref": "#\/components\/schemas\/oAuth2ProviderList" } } } @@ -30751,15 +32734,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", + "method": "listOAuth2Providers", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-mock-phone.md", + "demo": "project\/list-o-auth-2-providers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", + "scope": "oauth2.read", "platforms": [ "console", "server" @@ -30779,107 +32762,47 @@ ], "parameters": [ { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "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", - "format": "phone", - "x-example": "+12065550100" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "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": "" - } - }, - "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": [ + "in": "query" + }, { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "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", - "format": "phone", - "x-example": "+12065550100" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "in": "query" } ] } }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", "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 OAuth2 server (OIDC provider) configuration.", "responses": { "200": { - "description": "OAuth2 Providers List", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2ProviderList" + "$ref": "#\/components\/schemas\/project" } } } @@ -30887,15 +32810,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", + "method": "updateOAuth2Server", + "group": null, "cookies": false, "type": "", - "demo": "project\/list-o-auth-2-providers.md", + "demo": "project\/update-o-auth-2-server.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.write", "platforms": [ "console", "server" @@ -30913,32 +32836,111 @@ "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": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the OAuth2 server.", + "x-example": false + }, + "authorizationUrl": { + "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", + "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 + }, + "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" + }, + "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": { @@ -34778,7 +36780,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -34946,7 +36951,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -35114,7 +37122,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -35282,7 +37293,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -35450,7 +37464,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -36078,6 +38095,11 @@ "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 } } } @@ -36289,15 +38311,105 @@ "schema": { "type": "object", "properties": { - "enabled": { + "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" + ] + } + } + } + } + } + }, + "\/project\/policies\/password-strength": { + "patch": { + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", + "tags": [ + "project" + ], + "description": "Update the password strength requirements for users in the project.", + "responses": { + "200": { + "description": "Policy Password Strength", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordStrengthPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "project\/update-password-strength-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": { + "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": "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.", + "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 } - }, - "required": [ - "enabled" - ] + } } } } @@ -36679,7 +38791,7 @@ "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", "responses": { "200": { - "description": "Policy Password Dictionary, or Policy Password History, 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", + "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", "content": { "application\/json": { "schema": { @@ -36690,6 +38802,9 @@ { "$ref": "#\/components\/schemas\/policyPasswordHistory" }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, { "$ref": "#\/components\/schemas\/policyPasswordPersonalData" }, @@ -36710,6 +38825,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -36717,13 +38841,17 @@ "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" + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail" } } } @@ -36765,7 +38893,7 @@ "parameters": [ { "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "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.", "required": true, "schema": { "type": "string", @@ -36773,13 +38901,17 @@ "enum": [ "password-dictionary", "password-history", + "password-strength", "password-personal-data", "session-alert", "session-duration", "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "x-enum-name": "ProjectPolicyId" }, @@ -36926,7 +39058,7 @@ "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", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, documentsDB, tablesDB, vectorsDB, locale, health, project, storage, teams, users, vcs, webhooks, tokens, presences, sites, functions, proxy, graphql, migrations, messaging, advisor", "required": true, "schema": { "type": "string", @@ -36936,6 +39068,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -36943,6 +39078,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -37053,7 +39191,8 @@ "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": "", + "x-example": "password", + "format": "password", "x-nullable": true }, "senderEmail": { @@ -37848,7 +39987,10 @@ "variableId": { "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -38310,7 +40452,7 @@ }, "\/proxy\/rules\/redirect": { "post": { - "summary": "Create Redirect rule", + "summary": "Create redirect rule", "operationId": "proxyCreateRedirectRule", "tags": [ "proxy" @@ -38383,7 +40525,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -39178,7 +41320,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39206,7 +41351,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -39351,7 +41496,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -39361,7 +41506,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "installationId": { "type": "string", @@ -39701,7 +41846,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -39846,7 +41991,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -39856,7 +42001,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "fallbackFile": { "type": "string", @@ -40742,14 +42887,16 @@ "public": true, "auth": { "Project": [], - "Key": [] + "Key": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -41238,7 +43385,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -41646,7 +43796,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -42170,7 +44323,10 @@ "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-upload-id": true, + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "file": { "type": "string", @@ -42478,7 +44634,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -42486,7 +44643,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -42559,7 +44717,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -42567,7 +44726,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -42787,7 +44947,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -42795,7 +44956,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -42977,7 +45139,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -43832,7 +45997,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -44867,7 +47035,7 @@ }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { - "summary": "Update dateTime column", + "summary": "Update datetime column", "operationId": "tablesDBUpdateDatetimeColumn", "tags": [ "tablesDB" @@ -49611,7 +51779,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -50885,7 +53056,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -52294,7 +54468,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -52507,7 +54681,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -52527,7 +54704,8 @@ "type": "string", "description": "Plain text user password. Must be at least 8 chars.", "default": "", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -52603,7 +54781,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -52693,7 +54874,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -52927,7 +55111,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53017,7 +55204,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53107,7 +55297,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53231,7 +55424,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53339,7 +55535,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -54935,7 +57134,8 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -55307,6 +57507,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -55552,7 +57755,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55637,7 +57840,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55677,7 +57880,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "providerType": { "type": "string", @@ -55749,7 +57955,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55820,7 +58026,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55913,7 +58119,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56341,7 +58547,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -56353,6 +58562,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -56367,7 +58582,7 @@ }, "\/vectorsdb\/embeddings\/text": { "post": { - "summary": "Create Text Embeddings", + "summary": "Create text embeddings", "operationId": "vectorsDBCreateTextEmbeddings", "tags": [ "vectorsDB" @@ -56460,10 +58675,13 @@ "model": { "type": "string", "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", "enum": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ], "x-enum-name": "EmbeddingModel" } @@ -57287,7 +59505,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -57852,7 +60073,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -58437,6 +60661,9 @@ "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "" }, "in": "path" @@ -59203,7 +61430,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "url": { "type": "string", @@ -59245,7 +61475,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "secret": { "type": "string", @@ -59432,7 +61663,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" } }, "required": [ @@ -59596,6 +61828,18 @@ "name": "tablesdb", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, + { + "name": "documentsDB", + "description": "The DocumentsDB 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": "vectorsDB", + "description": "The VectorsDB service allows you to create vector collections, embeddings, indexes, and documents." + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -59624,6 +61868,18 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to configure event-driven HTTP callbacks for your project." + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for project resources." + }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -59644,6 +61900,10 @@ "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." @@ -60634,7 +62894,7 @@ "total": { "type": "integer", "description": "Total number of policies in the given project.", - "x-example": 9, + "x-example": 10, "format": "int32" }, "policies": { @@ -60648,6 +62908,9 @@ { "$ref": "#\/components\/schemas\/policyPasswordHistory" }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, { "$ref": "#\/components\/schemas\/policyPasswordPersonalData" }, @@ -60668,6 +62931,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -60675,13 +62947,17 @@ "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" + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail" } } }, @@ -60693,7 +62969,7 @@ "policies" ], "example": { - "total": 9, + "total": 10, "policies": "" } }, @@ -61202,7 +63478,7 @@ "model": { "type": "string", "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" + "x-example": "nomic-embed-text" }, "dimension": { "type": "integer", @@ -61236,7 +63512,7 @@ "error" ], "example": { - "model": "embeddinggemma", + "model": "nomic-embed-text", "dimension": 768, "embedding": [ 0.01, @@ -66153,10 +68429,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "description": "Presence metadata.", + "x-example": { + "key": "value" + }, + "nullable": true } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -66175,7 +68457,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -66461,6 +68746,36 @@ "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.", @@ -66543,6 +68858,11 @@ "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": { @@ -67648,6 +69968,11 @@ "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", @@ -67673,6 +69998,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -67689,6 +70015,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -68837,6 +71164,11 @@ "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.", @@ -68889,7 +71221,8 @@ "smtpPassword": { "type": "string", "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" + "x-example": "smtp-password", + "format": "password" }, "smtpSecure": { "type": "string", @@ -68946,10 +71279,18 @@ }, "x-example": {} }, - "region": { + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "$ref": "#\/components\/schemas\/block" + }, + "x-example": "" + }, + "consoleAccessedAt": { "type": "string", - "description": "Project region", - "x-example": "fra" + "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" }, "billingLimits": { "type": "object", @@ -68960,18 +71301,92 @@ }, "nullable": true }, - "blocks": { + "oAuth2ServerEnabled": { + "type": "boolean", + "description": "OAuth2 server status", + "x-example": false + }, + "oAuth2ServerAuthorizationUrl": { + "type": "string", + "description": "OAuth2 server authorization URL", + "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration" + }, + "oAuth2ServerScopes": { "type": "array", - "description": "Project blocks information", + "description": "OAuth2 server allowed scopes", "items": { - "$ref": "#\/components\/schemas\/block" + "type": "string" }, - "x-example": "" + "x-example": [ + "read", + "write" + ] }, - "consoleAccessedAt": { + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "x-example": [ + "calendar" + ] + }, + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "x-example": 86400, + "format": "int32" + }, + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 2592000, + "format": "int32" + }, + "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 + }, + "oAuth2ServerVerificationUrl": { "type": "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" + "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" + }, + "oAuth2ServerUserCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "x-example": 8, + "format": "int32" + }, + "oAuth2ServerUserCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "x-example": "alphanumeric" + }, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "x-example": 600, + "format": "int32" + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -68980,6 +71395,7 @@ "$updatedAt", "name", "teamId", + "region", "devKeys", "smtpEnabled", "smtpSenderName", @@ -68998,9 +71414,22 @@ "authMethods", "services", "protocols", - "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAuthorizationDetailsTypes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerVerificationUrl", + "oAuth2ServerUserCodeLength", + "oAuth2ServerUserCodeFormat", + "oAuth2ServerDeviceCodeDuration", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -69008,6 +71437,7 @@ "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "New Project", "teamId": "1592981250", + "region": "fra", "devKeys": {}, "smtpEnabled": false, "smtpSenderName": "John Appwrite", @@ -69017,7 +71447,7 @@ "smtpHost": "mail.appwrite.io", "smtpPort": 25, "smtpUsername": "emailuser", - "smtpPassword": "", + "smtpPassword": "smtp-password", "smtpSecure": "tls", "pingCount": 1, "pingedAt": "2020-10-15T06:38:00.000+00:00", @@ -69028,10 +71458,28 @@ "authMethods": {}, "services": {}, "protocols": {}, - "region": "fra", - "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "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" } }, "projectAuthMethod": { @@ -69081,6 +71529,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -69088,6 +71539,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -69196,7 +71650,8 @@ "authPassword": { "type": "string", "description": "HTTP basic authentication password.", - "x-example": "password" + "x-example": "webhook-password", + "format": "password" }, "secret": { "type": "string", @@ -69247,7 +71702,7 @@ ], "tls": true, "authUsername": "username", - "authPassword": "password", + "authPassword": "webhook-password", "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", @@ -71408,6 +73863,59 @@ "total": 5 } }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "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": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": true + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": true + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": true + } + }, + "required": [ + "$id", + "min", + "uppercase", + "lowercase", + "number", + "symbols" + ], + "example": { + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true + } + }, "policyPasswordPersonalData": { "description": "Policy Password Personal Data", "type": "object", @@ -71588,6 +74096,11 @@ "type": "boolean", "description": "Whether user MFA status is visible in memberships.", "x-example": true + }, + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "x-example": true } }, "required": [ @@ -71596,7 +74109,8 @@ "userEmail", "userPhone", "userName", - "userMFA" + "userMFA", + "userAccessedAt" ], "example": { "$id": "password-dictionary", @@ -71604,7 +74118,8 @@ "userEmail": true, "userPhone": true, "userName": true, - "userMFA": true + "userMFA": true, + "userAccessedAt": true } }, "platformWeb": { @@ -73652,66 +76167,6 @@ "description": "Hostname.", "x-example": "appwrite.io" }, - "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.", @@ -73742,18 +76197,6 @@ "projectId", "teamId", "hostname", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", "countryCode", "countryName" ], @@ -73776,18 +76219,6 @@ "projectId": "610fc2f985ee0", "teamId": "610fc2f985ee0", "hostname": "appwrite.io", - "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" } @@ -74139,6 +76570,78 @@ "enabled": true } }, + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, "backupRestoration": { "description": "Restoration", "type": "object", @@ -74332,17 +76835,431 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" + } + }, + "app": { + "description": "App", + "type": "object", + "properties": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "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" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "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" + }, + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] + } + }, + "appSecret": { + "description": "AppSecret", + "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": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + }, + "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", + "$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": "$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" + } + }, + "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": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked 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": [ + "$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": "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" + } + }, + "oauth2Grant": { + "description": "OAuth2 Grant", + "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" + }, + "scopes": { + "type": "array", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] + }, + "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", + "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" + ], + "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" } }, "activityEventList": { @@ -74512,6 +77429,62 @@ "total": 5, "gauges": "" } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "$ref": "#\/components\/schemas\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" + } } }, "securitySchemes": { @@ -74524,6 +77497,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "Key": { "type": "apiKey", "name": "X-Appwrite-Key", diff --git a/specs/latest/swagger2-latest-client.json b/specs/latest/swagger2-latest-client.json index f08217b1e..1c5f702b6 100644 --- a/specs/latest/swagger2-latest-client.json +++ b/specs/latest/swagger2-latest-client.json @@ -38,6 +38,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "JWT": { "type": "apiKey", "name": "X-Appwrite-JWT", @@ -206,7 +215,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -217,7 +229,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -1876,11 +1889,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -2253,7 +2267,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -2566,7 +2581,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2831,7 +2849,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2910,7 +2931,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -3222,7 +3246,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "identifier": { "type": "string", @@ -3444,7 +3471,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3533,7 +3563,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3811,7 +3844,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -4222,37 +4258,37 @@ ] } }, - "\/avatars\/browsers\/{code}": { + "\/apps": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "List Applications", + "operationId": "appsList", "consumes": [], "produces": [ - "image\/png" + "application\/json" ], "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": "List applications.", "responses": { "200": { - "description": "Image", + "description": "Apps list", "schema": { - "type": "file" + "$ref": "#\/definitions\/appsList" } } }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", + "method": "list", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", + "type": "", + "demo": "apps\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4260,7 +4296,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [] } @@ -4274,110 +4309,172 @@ ], "parameters": [ { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" - ], - "x-enum-name": "Browser", - "x-enum-keys": [ - "Avant Browser", - "Android WebView Beta", - "Google Chrome", - "Google Chrome (iOS)", - "Google Chrome (Mobile)", - "Chromium", - "Mozilla Firefox", - "Safari", - "Mobile Safari", - "Microsoft Edge", - "Microsoft Edge (iOS)", - "Opera Mini", - "Opera", - "Opera (Next)" - ], - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], "in": "query" }, { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, + "type": "boolean", + "x-example": false, + "default": true, "in": "query" - }, + } + ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.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": [ { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } } ] } }, - "\/avatars\/credit-cards\/{code}": { + "\/apps\/{appId}": { "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + "summary": "Get Application", + "operationId": "appsGet", "consumes": [], "produces": [ - "image\/png" + "application\/json" ], "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 application by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "App", "schema": { - "type": "file" + "$ref": "#\/definitions\/app" } } }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", + "method": "get", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", + "type": "", + "demo": "apps\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4385,7 +4482,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [] } @@ -4399,116 +4495,210 @@ ], "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, "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" - }, + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.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": [ { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" }, { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1, - "in": "query" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.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": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" } ] } }, - "\/avatars\/favicon": { + "\/apps\/{appId}\/secrets": { "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + "summary": "List Secrets", + "operationId": "appsListSecrets", "consumes": [], "produces": [ - "image\/*" + "application\/json" ], "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": "List client secrets for an application.", "responses": { "200": { - "description": "Image", + "description": "App secrets list", "schema": { - "type": "file" + "$ref": "#\/definitions\/appSecretList" } } }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", + "method": "listSecrets", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", + "type": "", + "demo": "apps\/list-secrets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4516,7 +4706,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [] } @@ -4530,48 +4719,68 @@ ], "parameters": [ { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", + "name": "appId", + "description": "Application unique ID.", "required": true, "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", + "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, + "type": "array", + "collectionFormat": "multi", + "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, + "type": "boolean", + "x-example": false, + "default": true, "in": "query" } ] - } - }, - "\/avatars\/flags\/{code}": { - "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", - "consumes": [], + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "consumes": [ + "application\/json" + ], "produces": [ - "image\/png" + "application\/json" ], "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": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "AppSecretPlaintext", "schema": { - "type": "file" + "$ref": "#\/definitions\/appSecretPlaintext" } } }, "deprecated": false, "x-appwrite": { - "method": "getFlag", + "method": "createSecret", "group": null, "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", + "type": "", + "demo": "apps\/create-secret.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "scope": "apps.write", "platforms": [ "console", "client", @@ -4579,7 +4788,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { "Project": [] } @@ -4593,41 +4801,705 @@ ], "parameters": [ { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", + "name": "appId", + "description": "Application unique ID.", "required": true, "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "schema": { + "$ref": "#\/definitions\/appSecret" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-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": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.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": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.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": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "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, + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" + ], + "x-enum-name": "Browser", + "x-enum-keys": [ + "Avant Browser", + "Android WebView Beta", + "Google Chrome", + "Google Chrome (iOS)", + "Google Chrome (Mobile)", + "Chromium", + "Mozilla Firefox", + "Safari", + "Mobile Safari", + "Microsoft Edge", + "Microsoft Edge (iOS)", + "Opera Mini", + "Opera", + "Opera (Next)" + ], + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/credit-cards\/{code}": { + "get": { + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "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, + "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, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "consumes": [], + "produces": [ + "image\/*" + ], + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "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, + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "consumes": [], + "produces": [ + "image\/png" + ], + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "schema": { + "type": "file" + } + } + }, + "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, + "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", @@ -5068,14 +5940,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5151,14 +6025,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5242,14 +6118,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5333,14 +6211,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6734,42 +7614,190 @@ } } ] - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", - "consumes": [ + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "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": "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", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } + } + }, + "deprecated": false, + "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", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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", + "consumes": [], + "produces": [ "application\/json" ], - "produces": [], "tags": [ "databases" ], - "description": "Delete a transaction 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", + "schema": { + "$ref": "#\/definitions\/documentList" + } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/delete-transaction.md", + "demo": "databases\/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\/databases\/delete-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, "auth": { "Project": [] } @@ -6783,20 +7811,65 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "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, + "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, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "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, + "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, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" } ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { + }, "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", + "summary": "Create document", + "operationId": "databasesCreateDocument", "consumes": [ "application\/json" ], @@ -6806,34 +7879,75 @@ "tags": [ "databases" ], - "description": "Create multiple operations in a single transaction.", + "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": "Transaction", + "description": "Document", "schema": { - "$ref": "#\/definitions\/transaction" + "$ref": "#\/definitions\/document" } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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", - "server", - "client" + "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\/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": "#\/definitions\/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": [] } @@ -6847,11 +7961,19 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "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). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -6860,14 +7982,44 @@ "schema": { "type": "object", "properties": { - "operations": { + "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": "Array of staged operations.", + "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\")\"]", + "x-nullable": true, + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", "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]", + "x-example": null, "items": { "type": "object" } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } } } @@ -6875,10 +8027,10 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", + "summary": "Get document", + "operationId": "databasesGetDocument", "consumes": [], "produces": [ "application\/json" @@ -6886,22 +8038,22 @@ "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.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { "200": { - "description": "Documents List", + "description": "Document", "schema": { - "$ref": "#\/definitions\/documentList" + "$ref": "#\/definitions\/document" } } }, "deprecated": true, "x-appwrite": { - "method": "listDocuments", + "method": "getDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/list-documents.md", + "demo": "databases\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6913,10 +8065,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listRows" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -6943,7 +8095,15 @@ "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", - "x-example": "", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -6965,31 +8125,12 @@ "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, - "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, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" } ] }, - "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" ], @@ -6999,7 +8140,7 @@ "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.", + "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", @@ -7010,11 +8151,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createDocument", + "method": "upsertDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-document.md", + "demo": "databases\/upsert-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -7026,16 +8167,16 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createRow" + "replaceWith": "tablesDB.upsertRow" }, "methods": [ { - "name": "createDocument", + "name": "upsertDocument", "namespace": "databases", - "desc": "Create document", + "desc": "", "auth": { "Project": [] }, @@ -7050,8 +8191,7 @@ "required": [ "databaseId", "collectionId", - "documentId", - "data" + "documentId" ], "responses": [ { @@ -7059,12 +8199,12 @@ "model": "#\/definitions\/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", + "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.createRow" + "replaceWith": "tablesDB.upsertRow" } } ], @@ -7090,46 +8230,154 @@ }, { "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.", "required": true, "type": "string", "x-example": "", "in": "path" }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "", + "in": "path" + }, { "name": "payload", "in": "body", "schema": { "type": "object", "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, "data": { "type": "object", - "description": "Document data as JSON 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, 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, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "x-nullable": true, "items": { "type": "string" } }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + ] + }, + "patch": { + "summary": "Update document", + "operationId": "databasesUpdateDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "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": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", "default": [], - "x-example": null, + "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\")\"]", + "x-nullable": true, "items": { - "type": "object" + "type": "string" } }, "transactionId": { @@ -7142,20 +8390,114 @@ } } ] + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "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, + "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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", - "consumes": [], + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "databases" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { "200": { "description": "Document", @@ -7166,26 +8508,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDocument", + "method": "decrementDocumentAttribute", "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", + "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", "client", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.getRow" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -7209,7 +8551,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, "type": "string", "x-example": "", @@ -7224,30 +8566,48 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" }, { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "type": "string", - "x-example": "", - "in": "query" + "name": "payload", + "in": "body", + "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 + } + } + } } ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -7257,9 +8617,9 @@ "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.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { - "201": { + "200": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -7268,63 +8628,27 @@ }, "deprecated": true, "x-appwrite": { - "method": "upsertDocument", + "method": "incrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/upsert-document.md", + "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" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" + "replaceWith": "tablesDB.incrementRowColumn" }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/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": [] } @@ -7354,48 +8678,120 @@ "in": "path" }, { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "schema": { + "$ref": "#\/definitions\/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": "payload", - "in": "body", - "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\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": 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, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" } ] }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", "consumes": [ "application\/json" ], @@ -7403,40 +8799,36 @@ "application\/json" ], "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 transaction.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "Transaction", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/transaction" } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "documents.write", "platforms": [ "console", - "client", - "server" + "server", + "client" ], "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-transaction.md", "auth": { "Project": [] } @@ -7449,101 +8841,64 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, { "name": "payload", "in": "body", "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"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\")\"]", - "x-nullable": true, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" } } } } ] - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "consumes": [ + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "consumes": [], + "produces": [ "application\/json" ], - "produces": [], "tags": [ - "databases" + "documentsDB" ], - "description": "Delete a document by its unique ID.", + "description": "Get a transaction by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Transaction", + "schema": { + "$ref": "#\/definitions\/transaction" + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "getTransaction", + "group": "transactions", "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-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ "console", - "client", - "server" + "server", + "client" ], "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-transaction.md", "auth": { "Project": [] } @@ -7557,51 +8912,18 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } } ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + }, "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", "consumes": [ "application\/json" ], @@ -7609,40 +8931,36 @@ "application\/json" ], "tags": [ - "databases" + "documentsDB" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "Document", + "description": "Transaction", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/transaction" } } }, - "deprecated": true, + "deprecated": false, "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}", + "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": [ - "client", + "console", "server", - "console" + "client" ], "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\/update-transaction.md", "auth": { "Project": [] } @@ -7656,34 +8974,11 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "type": "string", + "x-example": "", "in": "path" }, { @@ -7692,77 +8987,58 @@ "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 + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false } } } } ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", "consumes": [ "application\/json" ], - "produces": [ - "application\/json" - ], + "produces": [], "tags": [ - "databases" + "documentsDB" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Delete a transaction by its unique ID.", "responses": { - "200": { - "description": "Document", - "schema": { - "$ref": "#\/definitions\/document" - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "deleteTransaction", + "group": "transactions", "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}", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "documents.write", "platforms": [ - "client", + "console", "server", - "console" + "client" ], "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\/delete-transaction.md", "auth": { "Project": [] } @@ -7776,107 +9052,56 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "type": "string", + "x-example": "", "in": "path" - }, - { - "name": "payload", - "in": "body", - "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", - "consumes": [], + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "documentsDB" ], - "description": "List transactions across all databases.", + "description": "Create multiple operations in a single transaction.", "responses": { - "200": { - "description": "Transaction List", + "201": { + "description": "Transaction", "schema": { - "$ref": "#\/definitions\/transactionList" + "$ref": "#\/definitions\/transaction" } } }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", + "method": "createOperations", "group": "transactions", "cookies": false, "type": "", - "demo": "documentsdb\/list-transactions.md", + "demo": "documentsdb\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "documents.write", "platforms": [ - "console", "server", "client" ], "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\/documentsdb\/create-operations.md", "auth": { "Project": [] } @@ -7890,59 +9115,73 @@ ], "parameters": [ { - "name": "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, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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" + } + } + } + } } ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "consumes": [ - "application\/json" - ], + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", + "consumes": [], "produces": [ "application\/json" ], "tags": [ "documentsDB" ], - "description": "Create a new 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", "schema": { - "$ref": "#\/definitions\/transaction" + "$ref": "#\/definitions\/documentList" } } }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-transaction.md", + "demo": "documentsdb\/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\/documentsdb\/create-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [] } @@ -7956,63 +9195,161 @@ ], "parameters": [ { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } + "name": "databaseId", + "description": "Database ID.", + "required": true, + "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, + "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, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "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, + "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, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" } ] - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "consumes": [], + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ "documentsDB" ], - "description": "Get a transaction by its unique ID.", + "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": "Transaction", + "201": { + "description": "Document", "schema": { - "$ref": "#\/definitions\/transaction" + "$ref": "#\/definitions\/document" } } }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "createDocument", + "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\/create-document.md", + "rate-limit": 120, + "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\/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": "#\/definitions\/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": "#\/definitions\/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": [] } @@ -8026,55 +9363,109 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "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). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "", "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "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": "" + } + } + } } ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", - "consumes": [ - "application\/json" - ], + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "consumes": [], "produces": [ "application\/json" ], "tags": [ "documentsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { "200": { - "description": "Transaction", + "description": "Document", "schema": { - "$ref": "#\/definitions\/transaction" + "$ref": "#\/definitions\/document" } } }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/update-transaction.md", + "demo": "documentsdb\/get-document.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\/documentsdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -8088,71 +9479,123 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "payload", - "in": "body", - "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 - } - } - } + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "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, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "type": "string", + "x-example": "", + "in": "query" } ] }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ "documentsDB" ], - "description": "Delete a transaction 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": { - "204": { - "description": "No content" + "201": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "upsertDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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", - "server", - "client" + "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\/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": "#\/definitions\/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": [] } @@ -8166,20 +9609,62 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" + }, + { + "name": "payload", + "in": "body", + "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": "" + } + } + } } ] - } - }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", "consumes": [ "application\/json" ], @@ -8189,33 +9674,34 @@ "tags": [ "documentsDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "Document", "schema": { - "$ref": "#\/definitions\/transaction" + "$ref": "#\/definitions\/document" } } }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "updateDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "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": [ - "server", - "client" + "console", + "client", + "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\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -8229,11 +9715,27 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { @@ -8242,52 +9744,57 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", "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]", + "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": "object" + "type": "string" } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" } } } } ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", - "consumes": [], - "produces": [ + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "consumes": [ "application\/json" ], + "produces": [], "tags": [ "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 document by its unique ID.", "responses": { - "200": { - "description": "Documents List", - "schema": { - "$ref": "#\/definitions\/documentList" - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", + "method": "deleteDocument", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/list-documents.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", "client", @@ -8295,7 +9802,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } @@ -8325,49 +9832,34 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "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, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" + "x-example": "", + "in": "path" }, { - "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, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } } ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", "consumes": [ "application\/json" ], @@ -8377,9 +9869,9 @@ "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.", + "description": "Decrement a specific column of a row by a given value.", "responses": { - "201": { + "200": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8388,82 +9880,137 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDocument", + "method": "decrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-document.md", + "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" + "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": "#\/definitions\/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": "#\/definitions\/documentList" + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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": "" } - ], - "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 + } + } + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/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": [] } @@ -8486,46 +10033,45 @@ }, { "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.", "required": true, "type": "string", "x-example": "", "in": "path" }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "type": "string", + "in": "path" + }, { "name": "payload", "in": "body", "schema": { "type": "object", "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "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}" - }, - "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" - } + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], + "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, - "items": { - "type": "object" - } + "format": "float" }, "transactionId": { "type": "string", @@ -8538,37 +10084,40 @@ ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/functions\/{functionId}\/executions": { "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", + "summary": "List executions", + "operationId": "functionsListExecutions", "consumes": [], "produces": [ "application\/json" ], "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 list of all the current user function execution logs. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Executions List", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/executionList" } } }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "listExecutions", + "group": "executions", "cookies": false, "type": "", - "demo": "documentsdb\/get-document.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", @@ -8576,7 +10125,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -8590,32 +10138,16 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "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, "type": "array", "collectionFormat": "multi", @@ -8626,18 +10158,19 @@ "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, - "type": "string", - "x-example": "", + "type": "boolean", + "x-example": false, + "default": true, "in": "query" } ] }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", "consumes": [ "application\/json" ], @@ -8645,28 +10178,31 @@ "application\/json" ], "tags": [ - "documentsDB" + "functions" ], - "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": "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", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/execution" } } }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "createExecution", + "group": "executions", "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": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ "console", "client", @@ -8674,39 +10210,6 @@ ], "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": "#\/definitions\/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": [] } @@ -8720,27 +10223,11 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { @@ -8749,62 +10236,101 @@ "schema": { "type": "object", "properties": { - "data": { + "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": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "description": "HTTP headers of execution. Defaults to empty.", "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": { + "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 } } } } ] - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", - "consumes": [ - "application\/json" - ], + } + }, + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "documentsDB" + "functions" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Get a function execution log by its unique ID.", "responses": { "200": { - "description": "Document", + "description": "Execution", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/execution" } } }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "getExecution", + "group": "executions", "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": "functions\/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", "client", @@ -8812,7 +10338,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -8826,94 +10351,65 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "executionId", + "description": "Execution ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" - }, - { - "name": "payload", - "in": "body", - "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": "" - } - } - } } ] - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ - "documentsDB" + "graphql" ], - "description": "Delete a document by its unique ID.", + "description": "Execute a GraphQL mutation.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "query", + "group": "graphql", "cookies": false, - "type": "", - "demo": "documentsdb\/delete-document.md", + "type": "graphql", + "demo": "graphql\/query.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\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [] } @@ -8926,51 +10422,31 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, { "name": "payload", "in": "body", "schema": { "type": "object", "properties": { - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" } - } + }, + "required": [ + "query" + ] } } ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", "consumes": [ "application\/json" ], @@ -8978,36 +10454,36 @@ "application\/json" ], "tags": [ - "documentsDB" + "graphql" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Execute a GraphQL mutation.", "responses": { "200": { - "description": "Document", + "description": "Any", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/any" } } }, "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "mutation", + "group": "graphql", "cookies": false, - "type": "", - "demo": "documentsdb\/decrement-document-attribute.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": [ - "client", + "console", "server", - "console" + "client" ], "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\/graphql\/post.md", "auth": { "Project": [] } @@ -9020,108 +10496,66 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, { "name": "payload", "in": "body", "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": "" + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" } - } + }, + "required": [ + "query" + ] } } ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "documentsDB" + "locale" ], - "description": "Increment a specific column of a row by a given value.", + "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": "Document", + "description": "Locale", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/locale" } } }, "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "get", + "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\/get.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\/get-locale.md", "auth": { "Project": [] } @@ -9132,103 +10566,40 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "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": "" - } - } - } - } ] } }, - "\/functions\/{functionId}\/executions": { + "\/locale\/codes": { "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", + "summary": "List locale codes", + "operationId": "localeListCodes", "consumes": [], "produces": [ "application\/json" ], "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 locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", "responses": { "200": { - "description": "Executions List", + "description": "Locale codes list", "schema": { - "$ref": "#\/definitions\/executionList" + "$ref": "#\/definitions\/localeCodeList" } } }, "deprecated": false, "x-appwrite": { - "method": "listExecutions", - "group": "executions", + "method": "listCodes", + "group": null, "cookies": false, "type": "", - "demo": "functions\/list-executions.md", + "demo": "locale\/list-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -9236,6 +10607,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [] } @@ -9246,74 +10618,40 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "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, - "type": "array", - "collectionFormat": "multi", - "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, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" - } ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", - "consumes": [ - "application\/json" - ], + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", + "consumes": [], "produces": [ - "multipart\/form-data" + "application\/json" ], "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 continents. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "Execution", + "200": { + "description": "Continents List", "schema": { - "$ref": "#\/definitions\/execution" + "$ref": "#\/definitions\/continentList" } } }, "deprecated": false, "x-appwrite": { - "method": "createExecution", - "group": "executions", + "method": "listContinents", + "group": null, "cookies": false, "type": "", - "demo": "functions\/create-execution.md", + "demo": "locale\/list-continents.md", "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", "platforms": [ "console", "client", @@ -9321,6 +10659,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [] } @@ -9331,117 +10670,40 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "" - }, - "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\/countries": { "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", + "summary": "List countries", + "operationId": "localeListCountries", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "functions" + "locale" ], - "description": "Get a function execution log by its unique ID.", + "description": "List of all countries. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "Execution", + "description": "Countries List", "schema": { - "$ref": "#\/definitions\/execution" + "$ref": "#\/definitions\/countryList" } } }, "deprecated": false, "x-appwrite": { - "method": "getExecution", - "group": "executions", + "method": "listCountries", + "group": null, "cookies": false, "type": "", - "demo": "functions\/get-execution.md", + "demo": "locale\/list-countries.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -9449,6 +10711,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [] } @@ -9459,68 +10722,48 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } ] } }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", - "consumes": [ - "application\/json" - ], + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "graphql" + "locale" ], - "description": "Execute a GraphQL mutation.", + "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": "Any", + "description": "Countries List", "schema": { - "$ref": "#\/definitions\/any" + "$ref": "#\/definitions\/countryList" } } }, "deprecated": false, "x-appwrite": { - "method": "query", - "group": "graphql", + "method": "listCountriesEU", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "locale\/list-countries-eu.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-countries-eu.md", "auth": { "Project": [] } @@ -9531,70 +10774,48 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } ] } }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", - "consumes": [ - "application\/json" - ], + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "graphql" + "locale" ], - "description": "Execute a GraphQL mutation.", + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "Any", + "description": "Phones List", "schema": { - "$ref": "#\/definitions\/any" + "$ref": "#\/definitions\/phoneList" } } }, "deprecated": false, "x-appwrite": { - "method": "mutation", - "group": "graphql", + "method": "listCountriesPhones", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "locale\/list-countries-phones.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-countries-phones.md", "auth": { "Project": [] } @@ -9605,33 +10826,13 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } ] } }, - "\/locale": { + "\/locale\/currencies": { "get": { - "summary": "Get user locale", - "operationId": "localeGet", + "summary": "List currencies", + "operationId": "localeListCurrencies", "consumes": [], "produces": [ "application\/json" @@ -9639,22 +10840,22 @@ "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))", + "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": "Locale", + "description": "Currencies List", "schema": { - "$ref": "#\/definitions\/locale" + "$ref": "#\/definitions\/currencyList" } } }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "listCurrencies", "group": null, "cookies": false, "type": "", - "demo": "locale\/get.md", + "demo": "locale\/list-currencies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9666,7 +10867,7 @@ ], "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\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -9680,10 +10881,10 @@ ] } }, - "\/locale\/codes": { + "\/locale\/languages": { "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", + "summary": "List languages", + "operationId": "localeListLanguages", "consumes": [], "produces": [ "application\/json" @@ -9691,22 +10892,22 @@ "tags": [ "locale" ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "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": "Locale codes list", + "description": "Languages List", "schema": { - "$ref": "#\/definitions\/localeCodeList" + "$ref": "#\/definitions\/languageList" } } }, "deprecated": false, "x-appwrite": { - "method": "listCodes", + "method": "listLanguages", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-codes.md", + "demo": "locale\/list-languages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9718,7 +10919,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -9732,45 +10933,47 @@ ] } }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", - "consumes": [], + "\/messaging\/topics\/{topicId}\/subscribers": { + "post": { + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "tags": [ - "locale" + "messaging" ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "description": "Create a new subscriber.", "responses": { - "200": { - "description": "Continents List", + "201": { + "description": "Subscriber", "schema": { - "$ref": "#\/definitions\/continentList" + "$ref": "#\/definitions\/subscriber" } } }, "deprecated": false, "x-appwrite": { - "method": "listContinents", - "group": null, + "method": "createSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "locale\/list-continents.md", + "demo": "messaging\/create-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\/list-continents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [] } @@ -9778,51 +10981,84 @@ "security": [ { "Project": [], - "Session": [], - "JWT": [] + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "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": [ + "subscriberId", + "targetId" + ] + } } ] } }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", - "consumes": [], - "produces": [ + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ "application\/json" ], + "produces": [], "tags": [ - "locale" + "messaging" ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "description": "Delete a subscriber by its unique ID.", "responses": { - "200": { - "description": "Countries List", - "schema": { - "$ref": "#\/definitions\/countryList" - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listCountries", - "group": null, + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "locale\/list-countries.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\/list-countries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [] } @@ -9830,155 +11066,310 @@ "security": [ { "Project": [], - "Session": [], - "JWT": [] + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" } ] } }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", - "consumes": [], + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "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": "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": "Countries List", + "description": "OAuth2 Approve", "schema": { - "$ref": "#\/definitions\/countryList" + "$ref": "#\/definitions\/oauth2Approve" } } }, "deprecated": false, "x-appwrite": { - "method": "listCountriesEU", + "method": "approve", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-countries-eu.md", + "demo": "oauth2\/approve.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "oauth2.write", "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": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], + "ProjectQuery": [], "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } ] } }, - "\/locale\/countries\/phones": { + "\/oauth2\/{project_id}\/authorize": { "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", "consumes": [], "produces": [ "application\/json" ], "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": "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": "Phones List", + "description": "OAuth2 Authorize", "schema": { - "$ref": "#\/definitions\/phoneList" + "$ref": "#\/definitions\/oauth2Authorize" } } }, "deprecated": false, "x-appwrite": { - "method": "listCountriesPhones", + "method": "authorize", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-countries-phones.md", + "demo": "oauth2\/authorize.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "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": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [] + "ProjectQuery": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "client_id", + "description": "OAuth2 client ID.", + "required": true, + "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, + "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, + "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, + "type": "string", + "x-example": "", + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "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, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "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, + "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, + "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, + "type": "string", + "x-example": "", + "default": "", + "in": "query" } ] } }, - "\/locale\/currencies": { - "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", - "consumes": [], + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "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": "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": "Currencies List", + "201": { + "description": "OAuth2 Grant", "schema": { - "$ref": "#\/definitions\/currencyList" + "$ref": "#\/definitions\/oauth2Grant" } } }, "deprecated": false, "x-appwrite": { - "method": "listCurrencies", + "method": "createGrant", "group": null, "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\/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\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -9989,48 +11380,73 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "user_code": { + "type": "string", + "description": "User code displayed on the device.", + "x-example": "" + } + }, + "required": [ + "user_code" + ] + } + } ] } }, - "\/locale\/languages": { + "\/oauth2\/{project_id}\/grants\/{grant_id}": { "get": { - "summary": "List languages", - "operationId": "localeListLanguages", + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", "consumes": [], "produces": [ "application\/json" ], "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": "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": "Languages List", + "description": "OAuth2 Grant", "schema": { - "$ref": "#\/definitions\/languageList" + "$ref": "#\/definitions\/oauth2Grant" } } }, "deprecated": false, "x-appwrite": { - "method": "listLanguages", + "method": "getGrant", "group": null, "cookies": false, "type": "", - "demo": "locale\/list-languages.md", + "demo": "oauth2\/get-grant.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "oauth2.read", "platforms": [ - "console", "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -10041,13 +11457,31 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "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, + "type": "string", + "x-example": "", + "in": "path" + } ] } }, - "\/messaging\/topics\/{topicId}\/subscribers": { + "\/oauth2\/{project_id}\/reject": { "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", "consumes": [ "application\/json" ], @@ -10055,54 +11489,52 @@ "application\/json" ], "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new subscriber.", + "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": { - "201": { - "description": "Subscriber", + "200": { + "description": "OAuth2 Reject", "schema": { - "$ref": "#\/definitions\/subscriber" + "$ref": "#\/definitions\/oauth2Reject" } } }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "reject", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", + "demo": "oauth2\/reject.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "oauth2.write", "platforms": [ - "server", "client", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { - "Project": [] + "ProjectQuery": [] } }, "security": [ { - "Project": [], - "JWT": [], - "Session": [] + "ProjectQuery": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { @@ -10111,93 +11543,20 @@ "schema": { "type": "object", "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" - }, - "targetId": { + "grant_id": { "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "" + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "" } }, "required": [ - "subscriberId", - "targetId" + "grant_id" ] } } ] } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "messaging" - ], - "description": "Delete a subscriber by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", - "cookies": false, - "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", - "platforms": [ - "server", - "client", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "JWT": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/presences": { "get": { "summary": "List presences", @@ -10377,7 +11736,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10508,7 +11868,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10824,6 +12185,9 @@ "required": true, "x-upload-id": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "formData" }, @@ -11117,14 +12481,16 @@ "public": true, "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": [ @@ -11196,14 +12562,16 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -11420,14 +12788,16 @@ "public": true, "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": [ @@ -12122,7 +13492,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -12988,7 +14361,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -14521,7 +15897,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -14759,6 +16138,9 @@ "description": "Document ID.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" }, @@ -15032,6 +16414,10 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -15756,10 +17142,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -15778,7 +17170,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -16054,15 +17449,45 @@ "description": "User email address.", "x-example": "john@appwrite.io" }, - "phone": { - "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" + "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", + "x-nullable": true + }, + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "x-example": true, + "x-nullable": true + }, + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "x-example": false, + "x-nullable": true + }, + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "x-example": true, + "x-nullable": true }, - "emailVerification": { + "emailIsCanonical": { "type": "boolean", - "description": "Email verification status.", - "x-example": true + "description": "Whether the user email is in its canonical form.", + "x-example": true, + "x-nullable": true }, "phoneVerification": { "type": "boolean", @@ -16148,6 +17573,11 @@ "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": { @@ -17069,6 +18499,11 @@ "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", @@ -17094,6 +18529,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -17110,6 +18546,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -17442,400 +18879,859 @@ "properties": { "code": { "type": "string", - "description": "Phone code.", - "x-example": "+1" + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Header name.", + "x-example": "Content-Type" + }, + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "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": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "required": [ + "recoveryCodes" + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } + }, + "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": "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" + }, + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "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" + }, + "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" + }, + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "countryCode": { + "targetId": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Target ID.", + "x-example": "259125845563242502" }, - "countryName": { + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "items": { + "type": "object", + "$ref": "#\/definitions\/target" + } + }, + "userId": { "type": "string", - "description": "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": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { "type": "string", - "description": "Header name.", - "x-example": "Content-Type" + "description": "User Name.", + "x-example": "Aegon Targaryen" }, - "value": { + "topicId": { "type": "string", - "description": "Header value.", - "x-example": "application\/json" + "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": [ - "name", - "value" + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" ], "example": { - "name": "Content-Type", - "value": "application\/json" + "$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" } }, - "mfaChallenge": { - "description": "MFA Challenge", + "target": { + "description": "Target", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "Target ID.", + "x-example": "259125845563242502" }, "$createdAt": { "type": "string", - "description": "Token creation date in ISO 8601 format.", + "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": "5e5ea5c168bb8" + "x-example": "259125845563242502" }, - "expire": { + "providerId": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Provider ID.", + "x-example": "259125845563242502", + "x-nullable": true + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + }, + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ "$id", "$createdAt", + "$updatedAt", + "name", "userId", - "expire" + "providerType", + "identifier", + "expired" ], "example": { - "$id": "bb8ea5c16897e", + "$id": "259125845563242502", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "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 } }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", + "app": { + "description": "App", "type": "object", "properties": { - "recoveryCodes": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "redirectUris": { "type": "array", - "description": "Recovery codes.", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", "items": { "type": "string" }, "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" + "https:\/\/example.com\/callback" ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "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": { + "enabled": { "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", + "description": "Whether the app is enabled or not.", "x-example": true }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "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" }, - "email": { + "deviceFlow": { "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "x-example": false }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": [] } }, "required": [ - "totp", - "phone", - "email", - "recoveryCode" + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" ], "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", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] } }, - "transaction": { - "description": "Transaction", + "appSecret": { + "description": "AppSecret", "type": "object", "properties": { "$id": { "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Transaction 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": "Transaction update date in ISO 8601 format.", + "description": "Secret update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "appId": { "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" + "secret": { + "type": "string", + "description": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" }, - "expiresAt": { + "hint": { "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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", + "x-nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "status", - "operations", - "expiresAt" + "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", - "status": "pending", - "operations": 5, - "expiresAt": "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" } }, - "subscriber": { - "description": "Subscriber", + "appSecretPlaintext": { + "description": "AppSecretPlaintext", "type": "object", "properties": { "$id": { "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Subscriber 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": "Subscriber update date in ISO 8601 format.", + "description": "Secret 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": "Application ID this secret belongs to.", + "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" - }, - "items": { - "type": "object", - "$ref": "#\/definitions\/target" - } + "secret": { + "type": "string", + "description": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked value.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "userId": { + "hint": { "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "userName": { + "createdById": { "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "topicId": { + "createdByName": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "Name of the user who created the secret.", + "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 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", + "x-nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" + "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", - "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" + "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" }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" + "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" } }, - "target": { - "description": "Target", + "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" + } + }, + "oauth2Grant": { + "description": "OAuth2 Grant", "type": "object", "properties": { "$id": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "Grant ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Target 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": "Target 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": { + "userId": { "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" + "description": "ID of the user the grant belongs to.", + "x-example": "5e5ea5c16897e" }, - "userId": { + "appId": { "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "x-example": "5e5ea5c16897e" }, - "providerId": { + "scopes": { + "type": "array", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] + }, + "authorizationDetails": { "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "x-nullable": true + "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\"]}]" }, - "providerType": { + "prompt": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "x-example": "login" }, - "identifier": { + "redirectUri": { "type": "string", - "description": "The target identifier.", - "x-example": "token" + "description": "Redirect URI the user will be sent to after the flow completes.", + "x-example": "https:\/\/example.com\/callback" }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false + "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", - "name", "userId", - "providerType", - "identifier", - "expired" + "appId", + "scopes", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" ], "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 + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" + ], + "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" + } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "type": "object", + "$ref": "#\/definitions\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" } } }, diff --git a/specs/latest/swagger2-latest-console.json b/specs/latest/swagger2-latest-console.json index d907050f4..e838d8687 100644 --- a/specs/latest/swagger2-latest-console.json +++ b/specs/latest/swagger2-latest-console.json @@ -38,6 +38,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "Key": { "type": "apiKey", "name": "X-Appwrite-Key", @@ -230,7 +239,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -241,7 +253,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -2803,11 +2816,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -3640,7 +3654,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -3953,7 +3968,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -4218,7 +4236,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -4297,7 +4318,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -4609,7 +4633,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "identifier": { "type": "string", @@ -4831,7 +4858,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -4920,7 +4950,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -5198,7 +5231,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -5729,6 +5765,845 @@ ] } }, + "\/apps": { + "get": { + "summary": "List Applications", + "operationId": "appsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "List applications.", + "responses": { + "200": { + "description": "Apps list", + "schema": { + "$ref": "#\/definitions\/appsList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "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, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.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": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + ] + } + }, + "\/apps\/{appId}": { + "get": { + "summary": "Get Application", + "operationId": "appsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Get an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.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, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "List client secrets for an application.", + "responses": { + "200": { + "description": "App secrets list", + "schema": { + "$ref": "#\/definitions\/appSecretList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSecrets", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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, + "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, + "type": "array", + "collectionFormat": "multi", + "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, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Create a new client secret for an application.", + "responses": { + "201": { + "description": "AppSecretPlaintext", + "schema": { + "$ref": "#\/definitions\/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, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "schema": { + "$ref": "#\/definitions\/appSecret" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.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, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/avatars\/browsers\/{code}": { "get": { "summary": "Get browser icon", @@ -5769,7 +6644,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5777,7 +6653,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5895,7 +6772,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5903,7 +6781,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6027,7 +6906,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6035,7 +6915,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6091,7 +6972,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6099,7 +6981,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6579,7 +7462,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6587,7 +7471,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6663,7 +7548,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6671,7 +7557,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6755,7 +7642,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6763,7 +7651,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6847,7 +7736,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -6855,7 +7745,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -8100,6 +8991,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8109,6 +9001,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8240,6 +9133,9 @@ "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, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -8374,7 +9270,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -8393,6 +9292,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8402,6 +9302,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8655,6 +9556,9 @@ "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, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -8734,6 +9638,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8743,6 +9648,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8752,7 +9658,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "newResourceName": { "type": "string", @@ -9010,13 +9919,22 @@ "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-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.", @@ -9038,13 +9956,13 @@ "type": { "type": "string", "description": "Database type: shared (serverless) or dedicated (always-on).", - "default": "shared", + "default": "dedicated", "x-example": "shared" }, "specification": { "type": "string", "description": "Specification identifier.", - "default": "starter", + "default": "s-2vcpu-2gb", "x-example": "" }, "backend": { @@ -9056,21 +9974,21 @@ "cpu": { "type": "integer", "description": "CPU in millicores (125-16000).", - "default": 1000, + "default": 2000, "x-example": 125, "format": "int32" }, "memory": { "type": "integer", "description": "Memory in MB to allocate (128-65536).", - "default": 1024, + "default": 2048, "x-example": 128, "format": "int32" }, "storage": { "type": "integer", "description": "Storage in GB to allocate (1-16384).", - "default": 10, + "default": 25, "x-example": 1, "format": "int32" }, @@ -9102,7 +10020,7 @@ }, "highAvailabilitySyncMode": { "type": "string", - "description": "Replication sync mode. Allowed values: async, sync, quorum.", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", "x-example": "async", "x-nullable": true }, @@ -9191,7 +10109,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -9210,6 +10128,53 @@ ] } }, + "\/compute\/databases\/specifications": { + "get": { + "summary": "List dedicated database specifications.", + "operationId": "computeListDatabaseSpecifications", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "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", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseSpecificationList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDatabaseSpecifications", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-specifications.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": [] + } + ] + } + }, "\/compute\/databases\/{databaseId}": { "get": { "summary": "Get dedicated database.", @@ -9385,6 +10350,12 @@ "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.", @@ -9589,10 +10560,151 @@ ] } }, - "\/compute\/databases\/{databaseId}\/backups": { + "\/compute\/databases\/{databaseId}\/backups": { + "get": { + "summary": "List database backups.", + "operationId": "computeListDatabaseBackups", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseBackupList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDatabaseBackups", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/list-database-backups.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, + "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: status, type, databaseId", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create a database backup.", + "operationId": "computeCreateDatabaseBackup", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "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", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseBackup" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatabaseBackup", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/create-database-backup.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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + } + } + } + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backups.", - "operationId": "computeListDatabaseBackups", + "summary": "List database backup policies.", + "operationId": "computeListDatabaseBackupPolicies", "consumes": [], "produces": [ "application\/json" @@ -9600,22 +10712,22 @@ "tags": [ "compute" ], - "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "description": " List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "BackupList", + "description": "Backup policy list", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseBackupList" + "$ref": "#\/definitions\/backupPolicyList" } } }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseBackups", + "method": "listDatabaseBackupPolicies", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-backups.md", + "demo": "compute\/list-database-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9645,7 +10757,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: status, type, databaseId", + "description": "Array of query strings generated using the Query class provided by the SDK.", "required": false, "type": "array", "collectionFormat": "multi", @@ -9658,8 +10770,8 @@ ] }, "post": { - "summary": "Create a database backup.", - "operationId": "computeCreateDatabaseBackup", + "summary": "Create a database backup policy.", + "operationId": "computeCreateDatabaseBackupPolicy", "consumes": [ "application\/json" ], @@ -9669,22 +10781,22 @@ "tags": [ "compute" ], - "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 scheduled backup policy for a dedicated database.", "responses": { - "202": { - "description": "Backup", + "201": { + "description": "backup", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseBackup" + "$ref": "#\/definitions\/backupPolicy" } } }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseBackup", + "method": "createDatabaseBackupPolicy", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/create-database-backup.md", + "demo": "compute\/create-database-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9718,13 +10830,49 @@ "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" + ] } } ] @@ -10090,7 +11238,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "ttl": { "type": "integer", @@ -10429,7 +11580,7 @@ } ] }, - "post": { + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "consumes": [ @@ -10500,7 +11651,7 @@ "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.network\/v1\/sql\/execute` 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.", + "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\/execute` 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", @@ -10988,164 +12139,6 @@ ] } }, - "\/compute\/databases\/{databaseId}\/insights": { - "get": { - "summary": "Get database performance insights.", - "operationId": "computeGetDatabaseInsights", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Get query-level performance insights for a dedicated database. Returns top queries by execution time, wait events, and aggregate query statistics.", - "responses": { - "200": { - "description": "PerformanceInsights", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabasePerformanceInsights" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseInsights", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-insights.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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "period", - "description": "Analysis period for performance insights. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days).", - "required": false, - "type": "string", - "x-example": "1h", - "default": "1h", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of queries to return.", - "required": false, - "type": "integer", - "format": "int32", - "default": 25, - "in": "query" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", - "responses": { - "200": { - "description": "Dedicated database audit logs list", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseAuditLogList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDatabaseLogs", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/list-database-logs.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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "startTime", - "description": "Start time in ISO 8601 format.", - "required": false, - "type": "string", - "x-example": "", - "in": "query" - }, - { - "name": "endTime", - "description": "End time in ISO 8601 format.", - "required": false, - "type": "string", - "x-example": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of logs to return.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 100, - "in": "query" - } - ] - } - }, "\/compute\/databases\/{databaseId}\/maintenance": { "patch": { "summary": "Update database maintenance window.", @@ -11203,94 +12196,28 @@ "in": "path" }, { - "name": "payload", - "in": "body", - "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" - ] - } - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/metrics": { - "get": { - "summary": "Get database metrics.", - "operationId": "computeGetDatabaseMetrics", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Get detailed performance metrics for a dedicated database. Returns CPU, memory, storage, IOPS, QPS, and connection metrics.", - "responses": { - "200": { - "description": "DatabaseMetrics", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseMetrics" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseMetrics", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-metrics.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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "period", - "description": "Metrics aggregation period. Allowed values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", - "required": false, - "type": "string", - "x-example": "1h", - "default": "24h", - "in": "query" + "name": "payload", + "in": "body", + "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" + ] + } } ] } @@ -11308,7 +12235,7 @@ "tags": [ "compute" ], - "description": "Migrate a database between shared and dedicated types. Shared to dedicated creates an always-on StatefulSet with external access. Dedicated to shared converts to a serverless pod that scales to zero when idle. Data is preserved during migration.", + "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", @@ -11361,6 +12288,12 @@ "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 compute specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "", + "x-nullable": true } }, "required": [ @@ -12187,72 +13120,6 @@ ] } }, - "\/compute\/databases\/{databaseId}\/usage": { - "get": { - "summary": "Get database usage metrics.", - "operationId": "computeGetDatabaseUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Get usage metrics for a dedicated database including CPU, memory, storage, connections, and query statistics.", - "responses": { - "200": { - "description": "DedicatedDatabase", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseUsage" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseUsage", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-usage.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, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, "\/console\/assistant": { "post": { "summary": "Create assistant query", @@ -13327,6 +14194,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "appsecrets", + "oauth2grants", "attributes", "indexes", "functions", @@ -13411,6 +14281,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "app_secrets", + "oauth2_grants", "attributes", "indexes", "functions", @@ -14066,7 +14939,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -15075,7 +15951,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -20092,7 +20971,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -20676,6 +21558,9 @@ "description": "Document ID.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" }, @@ -22159,7 +23044,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -22171,6 +23059,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -22972,7 +23866,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -23517,7 +24414,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -29447,7 +30347,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -29554,7 +30457,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -29805,9 +30708,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -29902,9 +30808,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -30235,7 +31144,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -30751,7 +31660,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -31002,9 +31911,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -31099,9 +32011,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -31962,14 +32877,16 @@ "packaging": false, "public": true, "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -32171,7 +33088,7 @@ "application\/json" ], "produces": [ - "multipart\/form-data" + "application\/json" ], "tags": [ "functions" @@ -32654,7 +33571,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -33156,6 +34076,56 @@ ] } }, + "\/health\/audits-db": { + "get": { + "summary": "Get audits DB", + "operationId": "healthGetAuditsDB", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "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", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuditsDB", + "group": null, + "cookies": false, + "type": "", + "demo": "health\/get-audits-db.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\/health\/get-audits-db.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, "\/health\/cache": { "get": { "summary": "Get cache", @@ -35466,6 +36436,144 @@ ] } }, + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "manager" + ], + "description": "Clears internal cache.", + "responses": { + "200": { + "description": "File", + "schema": { + "type": "file" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteCache", + "group": "cache", + "cookies": false, + "type": "", + "demo": "manager\/delete-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "console" + ], + "packaging": false, + "public": true + }, + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "Target region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region", + "x-enum-keys": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ] + }, + "cache": { + "type": "string", + "description": "Cache target.", + "default": "cache", + "x-example": "cache", + "enum": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "x-enum-name": "CacheTarget", + "x-enum-keys": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ] + }, + "all": { + "type": "boolean", + "description": "Clear the entire selected cache target.", + "default": false, + "x-example": false + }, + "database": { + "type": "string", + "description": "Database cache scope.", + "default": "console", + "x-example": "console", + "enum": [ + "console", + "project", + "logs" + ], + "x-enum-name": "CacheDatabase", + "x-enum-keys": [ + "console", + "project", + "logs" + ] + }, + "projectId": { + "type": "string", + "description": "Project ID for project or logs database cache.", + "default": "", + "x-example": "" + }, + "collectionId": { + "type": "string", + "description": "Collection ID.", + "default": "", + "x-example": "" + }, + "documentId": { + "type": "string", + "description": "Document ID.", + "default": "", + "x-example": "" + } + } + } + } + ] + } + }, "\/manager\/users\/status": { "patch": { "summary": "Update a user status by ID or email", @@ -35686,7 +36794,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "subject": { "type": "string", @@ -35998,7 +37109,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "title": { "type": "string", @@ -36468,7 +37582,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "content": { "type": "string", @@ -37201,7 +38318,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37561,7 +38681,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37803,7 +38926,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37941,30 +39067,467 @@ "default": "", "x-example": "" }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "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": "" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-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-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-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-msg91-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new Resend provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createResendProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-resend-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-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "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\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a Resend provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateResendProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-resend-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-resend-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "" + }, "enabled": { "type": "boolean", "description": "Set as enabled.", "x-example": false, "x-nullable": true }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "" + }, "fromName": { "type": "string", "description": "Sender Name.", @@ -37980,13 +39543,13 @@ }, "replyToName": { "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", "default": "", "x-example": "" }, "replyToEmail": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", "default": "", "x-example": "" } @@ -37996,212 +39559,10 @@ ] } }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Create a new MSG91 provider.", - "responses": { - "201": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", - "cookies": false, - "type": "", - "demo": "messaging\/create-msg-91-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-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } - ] - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "messaging" - ], - "description": "Update a MSG91 provider by its unique ID.", - "responses": { - "200": { - "description": "Provider", - "schema": { - "$ref": "#\/definitions\/provider" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", - "cookies": false, - "type": "", - "demo": "messaging\/update-msg-91-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-msg91-provider.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "" - } - } - } - } - ] - } - }, - "\/messaging\/providers\/resend": { + "\/messaging\/providers\/sendgrid": { "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", "consumes": [ "application\/json" ], @@ -38211,7 +39572,7 @@ "tags": [ "messaging" ], - "description": "Create a new Resend provider.", + "description": "Create a new Sendgrid provider.", "responses": { "201": { "description": "Provider", @@ -38222,11 +39583,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createResendProvider", + "method": "createSendgridProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/create-resend-provider.md", + "demo": "messaging\/create-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -38237,7 +39598,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "auth": { "Project": [] } @@ -38258,7 +39619,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -38267,7 +39631,7 @@ }, "apiKey": { "type": "string", - "description": "Resend API key.", + "description": "Sendgrid API key.", "default": "", "x-example": "" }, @@ -38313,10 +39677,10 @@ ] } }, - "\/messaging\/providers\/resend\/{providerId}": { + "\/messaging\/providers\/sendgrid\/{providerId}": { "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", "consumes": [ "application\/json" ], @@ -38326,7 +39690,7 @@ "tags": [ "messaging" ], - "description": "Update a Resend provider by its unique ID.", + "description": "Update a Sendgrid provider by its unique ID.", "responses": { "200": { "description": "Provider", @@ -38337,11 +39701,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateResendProvider", + "method": "updateSendgridProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/update-resend-provider.md", + "demo": "messaging\/update-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -38352,7 +39716,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "auth": { "Project": [] } @@ -38392,7 +39756,7 @@ }, "apiKey": { "type": "string", - "description": "Resend API key.", + "description": "Sendgrid API key.", "default": "", "x-example": "" }, @@ -38427,10 +39791,10 @@ ] } }, - "\/messaging\/providers\/sendgrid": { + "\/messaging\/providers\/ses": { "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", "consumes": [ "application\/json" ], @@ -38440,7 +39804,7 @@ "tags": [ "messaging" ], - "description": "Create a new Sendgrid provider.", + "description": "Create a new Amazon SES provider.", "responses": { "201": { "description": "Provider", @@ -38451,11 +39815,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSendgridProvider", + "method": "createSesProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/create-sendgrid-provider.md", + "demo": "messaging\/create-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -38466,7 +39830,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", "auth": { "Project": [] } @@ -38487,18 +39851,33 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", "description": "Provider name.", "x-example": "" }, - "apiKey": { + "accessKey": { "type": "string", - "description": "Sendgrid API key.", + "description": "AWS access key ID.", "default": "", - "x-example": "" + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" }, "fromName": { "type": "string", @@ -38542,10 +39921,10 @@ ] } }, - "\/messaging\/providers\/sendgrid\/{providerId}": { + "\/messaging\/providers\/ses\/{providerId}": { "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", "consumes": [ "application\/json" ], @@ -38555,7 +39934,7 @@ "tags": [ "messaging" ], - "description": "Update a Sendgrid provider by its unique ID.", + "description": "Update an Amazon SES provider by its unique ID.", "responses": { "200": { "description": "Provider", @@ -38566,11 +39945,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSendgridProvider", + "method": "updateSesProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/update-sendgrid-provider.md", + "demo": "messaging\/update-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -38581,7 +39960,7 @@ ], "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\/messaging\/update-ses-provider.md", "auth": { "Project": [] } @@ -38619,11 +39998,23 @@ "x-example": false, "x-nullable": true }, - "apiKey": { + "accessKey": { "type": "string", - "description": "Sendgrid API key.", + "description": "AWS access key ID.", "default": "", - "x-example": "" + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" }, "fromName": { "type": "string", @@ -38802,7 +40193,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -38831,7 +40225,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -39080,7 +40475,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -39207,7 +40603,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39410,7 +40809,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39613,7 +41015,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -39816,7 +41221,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -40376,7 +41784,10 @@ "topicId": { "type": "string", "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -40843,7 +42254,10 @@ "subscriberId": { "type": "string", "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "targetId": { "type": "string", @@ -41139,6 +42553,9 @@ "user", "team", "membership", + "auth-methods", + "policies", + "oauth2-provider", "database", "table", "column", @@ -41162,13 +42579,25 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "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", @@ -41192,7 +42621,16 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" ] } }, @@ -41222,7 +42660,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -41300,6 +42738,9 @@ "user", "team", "membership", + "auth-methods", + "policies", + "oauth2-provider", "database", "table", "column", @@ -41323,13 +42764,25 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "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", @@ -41353,7 +42806,16 @@ "site-deployment", "site-variable", "platform", - "backup-policy" + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" ] }, "in": "query" @@ -41595,7 +43057,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -41995,7 +43457,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -42131,7 +43593,8 @@ "password": { "type": "string", "description": "Source's Database Password", - "x-example": "" + "x-example": "password", + "format": "password" }, "port": { "type": "integer", @@ -42285,7 +43748,8 @@ "description": "Source's Database Password.", "required": true, "type": "string", - "x-example": "", + "format": "password", + "x-example": "password", "in": "query" }, { @@ -42414,7 +43878,8 @@ "password": { "type": "string", "description": "Source's Database Password", - "x-example": "" + "x-example": "password", + "format": "password" }, "port": { "type": "integer", @@ -42560,7 +44025,8 @@ "description": "Source's Database Password.", "required": true, "type": "string", - "x-example": "", + "format": "password", + "x-example": "password", "in": "query" }, { @@ -42873,7 +44339,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -43659,7 +45128,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -44280,7 +45752,7 @@ "baa", "backup_recovery" ], - "x-enum-name": "OrganizationAddon", + "x-enum-name": "Addon", "x-enum-keys": [ "baa", "backup_recovery" @@ -45488,7 +46960,7 @@ "method": "getInvoiceDownload", "group": null, "cookies": false, - "type": "", + "type": "location", "demo": "organizations\/get-invoice-download.md", "rate-limit": 0, "rate-time": 3600, @@ -45501,12 +46973,14 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -45707,7 +47181,7 @@ "method": "getInvoiceView", "group": null, "cookies": false, - "type": "", + "type": "location", "demo": "organizations\/get-invoice-view.md", "rate-limit": 0, "rate-time": 3600, @@ -45720,12 +47194,14 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -47017,7 +48493,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -47032,7 +48509,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -47040,7 +48516,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -47150,14 +48625,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -47165,7 +48641,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -47173,8 +48648,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -47183,7 +48657,7 @@ } ], "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-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -47629,7 +49103,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -47733,9 +49210,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -47830,9 +49310,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -48008,9 +49491,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -48105,9 +49591,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -48351,9 +49840,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -48448,9 +49940,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -49010,6 +50505,162 @@ ] } }, + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the OAuth2 server (OIDC provider) configuration.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Server", + "group": null, + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-server.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": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the OAuth2 server.", + "x-example": false + }, + "authorizationUrl": { + "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", + "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 + }, + "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" + }, + "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": { "patch": { "summary": "Update project OAuth2 Amazon", @@ -52934,7 +54585,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53100,7 +54754,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53266,7 +54923,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53432,7 +55092,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53598,7 +55261,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -54221,6 +55887,11 @@ "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 } } } @@ -54449,6 +56120,97 @@ ] } }, + "\/project\/policies\/password-strength": { + "patch": { + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the password strength requirements for users in the project.", + "responses": { + "200": { + "description": "Policy Password Strength", + "schema": { + "$ref": "#\/definitions\/policyPasswordStrength" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordStrengthPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "project\/update-password-strength-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": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "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 + } + } + } + } + ] + } + }, "\/project\/policies\/session-alert": { "patch": { "summary": "Update session alert policy", @@ -54833,7 +56595,7 @@ "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", "responses": { "200": { - "description": "Policy Password Dictionary, or Policy Password History, 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", + "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", "schema": { "x-oneOf": [ { @@ -54842,6 +56604,9 @@ { "$ref": "#\/definitions\/policyPasswordHistory" }, + { + "$ref": "#\/definitions\/policyPasswordStrength" + }, { "$ref": "#\/definitions\/policyPasswordPersonalData" }, @@ -54862,6 +56627,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -54869,13 +56643,17 @@ "mapping": { "password-dictionary": "#\/definitions\/policyPasswordDictionary", "password-history": "#\/definitions\/policyPasswordHistory", + "password-strength": "#\/definitions\/policyPasswordStrength", "password-personal-data": "#\/definitions\/policyPasswordPersonalData", "session-alert": "#\/definitions\/policySessionAlert", "session-duration": "#\/definitions\/policySessionDuration", "session-invalidation": "#\/definitions\/policySessionInvalidation", "session-limit": "#\/definitions\/policySessionLimit", "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + "membership-privacy": "#\/definitions\/policyMembershipPrivacy", + "deny-aliased-email": "#\/definitions\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/definitions\/policyDenyDisposableEmail", + "deny-free-email": "#\/definitions\/policyDenyFreeEmail" } } } @@ -54914,32 +56692,40 @@ "parameters": [ { "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "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.", "required": true, "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" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-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" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "in": "path" } @@ -55087,7 +56873,7 @@ "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", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, documentsDB, tablesDB, vectorsDB, locale, health, project, storage, teams, users, vcs, webhooks, tokens, presences, sites, functions, proxy, graphql, migrations, messaging, advisor", "required": true, "type": "string", "x-example": "account", @@ -55096,6 +56882,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -55103,6 +56892,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -55117,6 +56909,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -55124,6 +56919,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -55232,7 +57030,8 @@ "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": "", + "x-example": "password", + "format": "password", "x-nullable": true }, "senderEmail": { @@ -56393,7 +58192,10 @@ "variableId": { "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -57366,7 +59168,7 @@ "enum": [ "active" ], - "x-enum-name": "ProjectStatus", + "x-enum-name": "Status", "x-enum-keys": [ "active" ] @@ -57683,7 +59485,7 @@ }, "\/proxy\/rules\/redirect": { "post": { - "summary": "Create Redirect rule", + "summary": "Create redirect rule", "operationId": "proxyCreateRedirectRule", "consumes": [ "application\/json" @@ -57758,7 +59560,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -58529,7 +60331,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -58557,7 +60362,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -58719,7 +60524,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime", + "x-enum-name": "BuildRuntime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -58825,7 +60630,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -59085,7 +60890,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -59438,7 +61243,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -59600,7 +61405,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime", + "x-enum-name": "BuildRuntime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -59706,7 +61511,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -60580,14 +62385,16 @@ "packaging": false, "public": true, "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -61130,7 +62937,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -61522,7 +63332,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -62034,6 +63847,9 @@ "required": true, "x-upload-id": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "formData" }, @@ -62330,7 +64146,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -62338,7 +64155,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -62410,7 +64228,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -62418,7 +64237,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -62635,7 +64455,8 @@ "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ @@ -62643,7 +64464,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -62963,7 +64785,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -63883,7 +65708,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -64869,7 +66697,7 @@ }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { - "summary": "Update dateTime column", + "summary": "Update datetime column", "operationId": "tablesDBUpdateDatetimeColumn", "consumes": [ "application\/json" @@ -69438,7 +71266,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -70920,7 +72751,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -72344,7 +74178,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -72545,7 +74379,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72565,7 +74402,8 @@ "type": "string", "description": "Plain text user password. Must be at least 8 chars.", "default": "", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -72642,7 +74480,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72733,7 +74574,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -72963,7 +74807,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -73054,7 +74901,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -73145,7 +74995,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -73270,7 +75123,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -73379,7 +75235,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -75003,7 +76862,8 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -75361,6 +77221,9 @@ "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -75602,7 +77465,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75683,7 +77546,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75719,7 +77582,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "providerType": { "type": "string", @@ -75795,7 +77661,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75863,7 +77729,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75953,7 +77819,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -77178,7 +79044,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -77190,6 +79059,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -77203,7 +79078,7 @@ }, "\/vectorsdb\/embeddings\/text": { "post": { - "summary": "Create Text Embeddings", + "summary": "Create text embeddings", "operationId": "vectorsDBCreateTextEmbeddings", "consumes": [ "application\/json" @@ -77296,14 +79171,20 @@ "model": { "type": "string", "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", "enum": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ], "x-enum-name": "EmbeddingModel", "x-enum-keys": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ] } }, @@ -78188,7 +80069,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -78721,7 +80605,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -79272,6 +81159,9 @@ "description": "Document ID.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" }, @@ -80198,7 +82088,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "url": { "type": "string", @@ -80240,7 +82133,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "secret": { "type": "string", @@ -80421,7 +82315,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" } }, "required": [ @@ -80582,6 +82477,18 @@ "name": "tablesdb", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, + { + "name": "documentsDB", + "description": "The DocumentsDB 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": "vectorsDB", + "description": "The VectorsDB service allows you to create vector collections, embeddings, indexes, and documents." + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -80610,6 +82517,18 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to configure event-driven HTTP callbacks for your project." + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for project resources." + }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -80630,6 +82549,14 @@ "name": "console", "description": "The Console service allows you to interact with console relevant information." }, + { + "name": "assistant", + "description": "The Assistant service allows Console users to ask assistant queries." + }, + { + "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." @@ -81831,7 +83758,7 @@ "total": { "type": "integer", "description": "Total number of policies in the given project.", - "x-example": 9, + "x-example": 10, "format": "int32" }, "policies": { @@ -81845,6 +83772,9 @@ { "$ref": "#\/definitions\/policyPasswordHistory" }, + { + "$ref": "#\/definitions\/policyPasswordStrength" + }, { "$ref": "#\/definitions\/policyPasswordPersonalData" }, @@ -81865,6 +83795,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -81872,13 +83811,17 @@ "mapping": { "password-dictionary": "#\/definitions\/policyPasswordDictionary", "password-history": "#\/definitions\/policyPasswordHistory", + "password-strength": "#\/definitions\/policyPasswordStrength", "password-personal-data": "#\/definitions\/policyPasswordPersonalData", "session-alert": "#\/definitions\/policySessionAlert", "session-duration": "#\/definitions\/policySessionDuration", "session-invalidation": "#\/definitions\/policySessionInvalidation", "session-limit": "#\/definitions\/policySessionLimit", "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + "membership-privacy": "#\/definitions\/policyMembershipPrivacy", + "deny-aliased-email": "#\/definitions\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/definitions\/policyDenyDisposableEmail", + "deny-free-email": "#\/definitions\/policyDenyFreeEmail" } } }, @@ -81890,7 +83833,7 @@ "policies" ], "example": { - "total": 9, + "total": 10, "policies": "" } }, @@ -82503,7 +84446,7 @@ "model": { "type": "string", "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" + "x-example": "nomic-embed-text" }, "dimension": { "type": "integer", @@ -82537,7 +84480,7 @@ "error" ], "example": { - "model": "embeddinggemma", + "model": "nomic-embed-text", "dimension": 768, "embedding": [ 0.01, @@ -87812,10 +89755,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -87834,7 +89783,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -88120,6 +90072,36 @@ "description": "Email verification status.", "x-example": true }, + "emailCanonical": { + "type": "string", + "description": "Canonical form of the user email address.", + "x-example": "john@appwrite.io", + "x-nullable": true + }, + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "x-example": true, + "x-nullable": true + }, + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "x-example": false, + "x-nullable": true + }, + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "x-example": true, + "x-nullable": true + }, + "emailIsCanonical": { + "type": "boolean", + "description": "Whether the user email is in its canonical form.", + "x-example": true, + "x-nullable": true + }, "phoneVerification": { "type": "boolean", "description": "Phone verification status.", @@ -88204,6 +90186,11 @@ "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": { @@ -89310,6 +91297,11 @@ "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", @@ -89335,6 +91327,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -89351,6 +91344,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -91453,6 +93447,11 @@ "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.", @@ -91506,7 +93505,8 @@ "smtpPassword": { "type": "string", "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" + "x-example": "smtp-password", + "format": "password" }, "smtpSecure": { "type": "string", @@ -91566,10 +93566,19 @@ }, "x-example": {} }, - "region": { + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "type": "object", + "$ref": "#\/definitions\/block" + }, + "x-example": "" + }, + "consoleAccessedAt": { "type": "string", - "description": "Project region", - "x-example": "fra" + "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" }, "billingLimits": { "type": "object", @@ -91581,19 +93590,92 @@ }, "x-nullable": true }, - "blocks": { + "oAuth2ServerEnabled": { + "type": "boolean", + "description": "OAuth2 server status", + "x-example": false + }, + "oAuth2ServerAuthorizationUrl": { + "type": "string", + "description": "OAuth2 server authorization URL", + "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration" + }, + "oAuth2ServerScopes": { "type": "array", - "description": "Project blocks information", + "description": "OAuth2 server allowed scopes", "items": { - "type": "object", - "$ref": "#\/definitions\/block" + "type": "string" }, - "x-example": "" + "x-example": [ + "read", + "write" + ] }, - "consoleAccessedAt": { + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "x-example": [ + "calendar" + ] + }, + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "x-example": 86400, + "format": "int32" + }, + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 2592000, + "format": "int32" + }, + "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 + }, + "oAuth2ServerVerificationUrl": { "type": "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" + "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" + }, + "oAuth2ServerUserCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "x-example": 8, + "format": "int32" + }, + "oAuth2ServerUserCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "x-example": "alphanumeric" + }, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "x-example": 600, + "format": "int32" + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -91602,6 +93684,7 @@ "$updatedAt", "name", "teamId", + "region", "devKeys", "smtpEnabled", "smtpSenderName", @@ -91620,9 +93703,22 @@ "authMethods", "services", "protocols", - "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAuthorizationDetailsTypes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerVerificationUrl", + "oAuth2ServerUserCodeLength", + "oAuth2ServerUserCodeFormat", + "oAuth2ServerDeviceCodeDuration", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -91630,6 +93726,7 @@ "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "New Project", "teamId": "1592981250", + "region": "fra", "devKeys": {}, "smtpEnabled": false, "smtpSenderName": "John Appwrite", @@ -91639,7 +93736,7 @@ "smtpHost": "mail.appwrite.io", "smtpPort": 25, "smtpUsername": "emailuser", - "smtpPassword": "", + "smtpPassword": "smtp-password", "smtpSecure": "tls", "pingCount": 1, "pingedAt": "2020-10-15T06:38:00.000+00:00", @@ -91650,10 +93747,28 @@ "authMethods": {}, "services": {}, "protocols": {}, - "region": "fra", - "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "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" } }, "projectAuthMethod": { @@ -91703,6 +93818,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -91710,6 +93828,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -91818,7 +93939,8 @@ "authPassword": { "type": "string", "description": "HTTP basic authentication password.", - "x-example": "password" + "x-example": "webhook-password", + "format": "password" }, "secret": { "type": "string", @@ -91869,7 +93991,7 @@ ], "tls": true, "authUsername": "username", - "authPassword": "password", + "authPassword": "webhook-password", "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", @@ -94030,6 +96152,59 @@ "total": 5 } }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "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": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": true + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": true + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": true + } + }, + "required": [ + "$id", + "min", + "uppercase", + "lowercase", + "number", + "symbols" + ], + "example": { + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true + } + }, "policyPasswordPersonalData": { "description": "Policy Password Personal Data", "type": "object", @@ -94210,6 +96385,11 @@ "type": "boolean", "description": "Whether user MFA status is visible in memberships.", "x-example": true + }, + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "x-example": true } }, "required": [ @@ -94218,7 +96398,8 @@ "userEmail", "userPhone", "userName", - "userMFA" + "userMFA", + "userAccessedAt" ], "example": { "$id": "password-dictionary", @@ -94226,7 +96407,8 @@ "userEmail": true, "userPhone": true, "userName": true, - "userMFA": true + "userMFA": true, + "userAccessedAt": true } }, "platformWeb": { @@ -99009,6 +101191,72 @@ "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": "int32" + }, + "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" + }, + "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.", @@ -99050,6 +101298,12 @@ "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.", @@ -99066,6 +101320,17 @@ "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", @@ -99073,6 +101338,7 @@ "message", "size", "version", + "oauth2-provider", "backup-policy" ], "example": { @@ -99084,6 +101350,17 @@ "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, @@ -99091,6 +101368,7 @@ "message": 50, "size": 30000, "version": "1.4.0", + "oauth2-provider": 5, "backup-policy": 5 } }, @@ -99483,66 +101761,6 @@ "description": "Hostname.", "x-example": "appwrite.io" }, - "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.", @@ -99573,18 +101791,6 @@ "projectId", "teamId", "hostname", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", "countryCode", "countryName" ], @@ -99607,18 +101813,6 @@ "projectId": "610fc2f985ee0", "teamId": "610fc2f985ee0", "hostname": "appwrite.io", - "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" } @@ -100235,65 +102429,6 @@ "resourceType": "database" } }, - "dedicatedDatabaseAuditLog": { - "description": "AuditLog", - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "description": "When the event occurred.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "user": { - "type": "string", - "description": "Database user that performed the action.", - "x-example": "appwrite" - }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" - }, - "action": { - "type": "string", - "description": "The action performed (e.g., CREATE TABLE, DROP INDEX).", - "x-example": "CREATE TABLE" - }, - "object": { - "type": "string", - "description": "The database object affected.", - "x-example": "public.users" - }, - "statement": { - "type": "string", - "description": "The full SQL statement.", - "x-example": "CREATE TABLE users (id serial PRIMARY KEY)" - }, - "clientAddress": { - "type": "string", - "description": "Client IP address.", - "x-example": "192.168.1.100" - } - }, - "required": [ - "timestamp", - "user", - "database", - "action", - "object", - "statement", - "clientAddress" - ], - "example": { - "timestamp": "2020-10-15T06:38:00.000+00:00", - "user": "appwrite", - "database": "appwrite", - "action": "CREATE TABLE", - "object": "public.users", - "statement": "CREATE TABLE users (id serial PRIMARY KEY)", - "clientAddress": "192.168.1.100" - } - }, "dedicatedDatabaseBackup": { "description": "Backup", "type": "object", @@ -100318,6 +102453,16 @@ "description": "Project ID.", "x-example": "5e5ea5c16897e" }, + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" + }, "type": { "type": "string", "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", @@ -100365,6 +102510,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -100379,6 +102526,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -100911,6 +103060,11 @@ "description": "Does plan support blocking free email addresses.", "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.", @@ -101038,6 +103192,7 @@ "supportsDisposableEmailValidation", "supportsCanonicalEmailValidation", "supportsFreeEmailValidation", + "supportsProjectSpecificRoles", "backupsEnabled", "usagePerProject", "supportedAddons", @@ -101101,6 +103256,7 @@ "supportsDisposableEmailValidation": true, "supportsCanonicalEmailValidation": true, "supportsFreeEmailValidation": true, + "supportsProjectSpecificRoles": true, "backupsEnabled": true, "usagePerProject": true, "supportedAddons": null, @@ -101372,7 +103528,7 @@ "branchId": { "type": "string", "description": "Branch identifier.", - "x-example": "branch-a1b2c3d4" + "x-example": "a1b2c3d4" }, "branchName": { "type": "string", @@ -101382,26 +103538,83 @@ "namespace": { "type": "string", "description": "Kubernetes namespace where the branch is deployed.", - "x-example": "branch-a1b2c3d4" + "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.", + "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 SSL is required.", + "x-example": false + }, + "engine": { + "type": "string", + "description": "Database engine. Possible values: postgres, mysql, mariadb, mongodb.", + "x-example": "postgres" + }, + "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" + "expiresAt", + "host", + "port", + "database", + "username", + "password", + "ssl", + "engine", + "connectionString" ], "example": { - "branchId": "branch-a1b2c3d4", + "branchId": "a1b2c3d4", "branchName": "branch-a1b2c3d4", - "namespace": "branch-a1b2c3d4", - "expiresAt": 1711411200 + "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": { @@ -101648,7 +103861,7 @@ "host": { "type": "string", "description": "Database hostname.", - "x-example": "db-myproject-mydb.fra.appwrite.network" + "x-example": "db-myproject-mydb.fra.appwrite.center" }, "port": { "type": "integer", @@ -101671,6 +103884,22 @@ "description": "Database name.", "x-example": "appwrite" }, + "tcpHost": { + "type": "string", + "description": "Database TCP hostname or address.", + "x-example": "db-myproject-mydb.fra.appwrite.center" + }, + "tcpPort": { + "type": "integer", + "description": "Database TCP port.", + "x-example": 5432, + "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.", @@ -101679,12 +103908,12 @@ "ssl": { "type": "boolean", "description": "Whether SSL is required.", - "x-example": true + "x-example": false }, "connectionString": { "type": "string", "description": "Full connection string.", - "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.network:5432\/appwrite?sslmode=require" + "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" } }, "required": [ @@ -101694,20 +103923,26 @@ "username", "password", "database", + "tcpHost", + "tcpPort", + "tcpDatabase", "engine", "ssl", "connectionString" ], "example": { "$id": "5e5ea5c16897e", - "host": "db-myproject-mydb.fra.appwrite.network", + "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": true, - "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.network:5432\/appwrite?sslmode=require" + "ssl": false, + "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" } }, "credit": { @@ -101861,103 +104096,6 @@ "available": 5 } }, - "dedicatedDatabaseMetrics": { - "description": "DatabaseMetrics", - "type": "object", - "properties": { - "period": { - "type": "string", - "description": "Metrics aggregation period. Possible values: 1h (last hour), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days).", - "x-example": "24h" - }, - "cpuPercent": { - "type": "number", - "description": "Average CPU usage percentage.", - "x-example": 45.2, - "format": "double" - }, - "memoryPercent": { - "type": "number", - "description": "Average memory usage percentage.", - "x-example": 62.1, - "format": "double" - }, - "memoryUsedBytes": { - "type": "integer", - "description": "Memory used in bytes.", - "x-example": 536870912, - "format": "int32" - }, - "memoryMaxBytes": { - "type": "integer", - "description": "Maximum memory available in bytes.", - "x-example": 1073741824, - "format": "int32" - }, - "storageUsedBytes": { - "type": "integer", - "description": "Storage used in bytes.", - "x-example": 1073741824, - "format": "int32" - }, - "connectionsActive": { - "type": "integer", - "description": "Current active connections.", - "x-example": 15, - "format": "int32" - }, - "connectionsMax": { - "type": "integer", - "description": "Maximum connections configured.", - "x-example": 100, - "format": "int32" - }, - "iopsRead": { - "type": "number", - "description": "Average read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWrite": { - "type": "number", - "description": "Average write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "qps": { - "type": "number", - "description": "Queries per second.", - "x-example": 230.7, - "format": "double" - } - }, - "required": [ - "period", - "cpuPercent", - "memoryPercent", - "memoryUsedBytes", - "memoryMaxBytes", - "storageUsedBytes", - "connectionsActive", - "connectionsMax", - "iopsRead", - "iopsWrite", - "qps" - ], - "example": { - "period": "24h", - "cpuPercent": 45.2, - "memoryPercent": 62.1, - "memoryUsedBytes": 536870912, - "memoryMaxBytes": 1073741824, - "storageUsedBytes": 1073741824, - "connectionsActive": 15, - "connectionsMax": 100, - "iopsRead": 125.5, - "iopsWrite": 45.3, - "qps": 230.7 - } - }, "dedicatedDatabase": { "description": "DedicatedDatabase", "type": "object", @@ -101992,6 +104130,11 @@ "description": "Database type: shared (serverless) or dedicated (always-on).", "x-example": "dedicated" }, + "api": { + "type": "string", + "description": "Product API that owns this database: compute, documentsdb, or vectorsdb.", + "x-example": "compute" + }, "region": { "type": "string", "description": "Region identifier (e.g., fra, nyc, syd).", @@ -102010,7 +104153,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -102020,7 +104163,7 @@ "hostname": { "type": "string", "description": "Database hostname for connections.", - "x-example": "db-myproject-mydb.fra.appwrite.network" + "x-example": "db-myproject-mydb.fra.appwrite.center" }, "connectionPort": { "type": "integer", @@ -102041,7 +104184,7 @@ "connectionString": { "type": "string", "description": "Full database connection string (URI format).", - "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.network:5432\/postgres" + "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres" }, "status": { "type": "string", @@ -102200,7 +104343,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -102246,6 +104389,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -102298,16 +104442,17 @@ "projectId": "5e5ea5c16897e", "name": "My Production Database", "type": "dedicated", + "api": "compute", "region": "fra", "engine": "postgres", "version": "16", - "specification": "starter", + "specification": "s-2vcpu-2gb", "backend": "edge", - "hostname": "db-myproject-mydb.fra.appwrite.network", + "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.network:5432\/postgres", + "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", @@ -102338,7 +104483,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -104259,151 +106404,6 @@ "failed": false } }, - "dedicatedDatabasePerformanceInsights": { - "description": "PerformanceInsights", - "type": "object", - "properties": { - "topQueries": { - "type": "array", - "description": "Top queries by total execution time.", - "items": { - "type": "object", - "$ref": "#\/definitions\/dedicatedDatabasePerformanceInsightsQuery" - }, - "x-example": [] - }, - "waitEvents": { - "type": "array", - "description": "Active wait events.", - "items": { - "type": "object", - "$ref": "#\/definitions\/dedicatedDatabasePerformanceInsightsWaitEvent" - }, - "x-example": [] - }, - "totalCalls": { - "type": "integer", - "description": "Total number of query calls.", - "x-example": 150000, - "format": "int32" - }, - "totalTimeMs": { - "type": "number", - "description": "Total query execution time in milliseconds.", - "x-example": 85432.12, - "format": "double" - }, - "avgTimeMs": { - "type": "number", - "description": "Average query execution time in milliseconds.", - "x-example": 0.57, - "format": "double" - } - }, - "required": [ - "topQueries", - "waitEvents", - "totalCalls", - "totalTimeMs", - "avgTimeMs" - ], - "example": { - "topQueries": [], - "waitEvents": [], - "totalCalls": 150000, - "totalTimeMs": 85432.12, - "avgTimeMs": 0.57 - } - }, - "dedicatedDatabasePerformanceInsightsQuery": { - "description": "PerformanceInsightsQuery", - "type": "object", - "properties": { - "query": { - "type": "string", - "description": "The SQL query text.", - "x-example": "SELECT * FROM users WHERE email = $1" - }, - "calls": { - "type": "integer", - "description": "Number of times this query has been executed.", - "x-example": 42, - "format": "int32" - }, - "totalTimeMs": { - "type": "number", - "description": "Total execution time in milliseconds.", - "x-example": 1523.4, - "format": "double" - }, - "meanTimeMs": { - "type": "number", - "description": "Mean execution time in milliseconds.", - "x-example": 36.27, - "format": "double" - }, - "rows": { - "type": "integer", - "description": "Total rows returned or affected.", - "x-example": 1250, - "format": "int32" - } - }, - "required": [ - "query", - "calls", - "totalTimeMs", - "meanTimeMs", - "rows" - ], - "example": { - "query": "SELECT * FROM users WHERE email = $1", - "calls": 42, - "totalTimeMs": 1523.4, - "meanTimeMs": 36.27, - "rows": 1250 - } - }, - "dedicatedDatabasePerformanceInsightsWaitEvent": { - "description": "PerformanceInsightsWaitEvent", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Wait event name.", - "x-example": "DataFileRead" - }, - "type": { - "type": "string", - "description": "Wait event type or category.", - "x-example": "IO" - }, - "count": { - "type": "integer", - "description": "Number of occurrences.", - "x-example": 15, - "format": "int32" - }, - "totalWaitMs": { - "type": "number", - "description": "Total wait time in milliseconds.", - "x-example": 234.5, - "format": "double" - } - }, - "required": [ - "event", - "type", - "count", - "totalWaitMs" - ], - "example": { - "event": "DataFileRead", - "type": "IO", - "count": 15, - "totalWaitMs": 234.5 - } - }, "dedicatedDatabasePITRWindows": { "description": "PITRWindows", "type": "object", @@ -104792,6 +106792,78 @@ "enabled": true } }, + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, "dedicatedDatabasePooler": { "description": "PoolerConfig", "type": "object", @@ -105337,6 +107409,183 @@ "database": "appwrite" } }, + "dedicatedDatabaseSpecification": { + "description": "Specification", + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Specification slug. Use this value when creating a dedicated database.", + "x-example": "s-2vcpu-2gb" + }, + "name": { + "type": "string", + "description": "Human readable specification name.", + "x-example": "Standard" + }, + "price": { + "type": "number", + "description": "Monthly price of the specification in USD.", + "x-example": 23, + "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" + }, + "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": [ + "slug", + "name", + "price", + "cpu", + "memory", + "maxConnections", + "includedStorage", + "includedBandwidth", + "enabled" + ], + "example": { + "slug": "s-2vcpu-2gb", + "name": "Standard", + "price": 23, + "cpu": 2000, + "memory": 2048, + "maxConnections": 200, + "includedStorage": 25, + "includedBandwidth": 200, + "enabled": true + } + }, + "dedicatedDatabaseSpecificationList": { + "description": "SpecificationList", + "type": "object", + "properties": { + "specifications": { + "type": "array", + "description": "List of dedicated database specifications.", + "items": { + "type": "object", + "$ref": "#\/definitions\/dedicatedDatabaseSpecification" + }, + "x-example": [] + }, + "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, + "items": { + "type": "object", + "$ref": "#\/definitions\/dedicatedDatabaseSpecificationPricing" + } + } + }, + "required": [ + "specifications", + "total", + "pricing" + ], + "example": { + "specifications": [], + "total": 9, + "pricing": null + } + }, + "dedicatedDatabaseSpecificationPricing": { + "description": "SpecificationPricing", + "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" + }, + "haReplicaRate": { + "type": "number", + "description": "High availability replica price as a fraction of the specification cost.", + "x-example": 0.5, + "format": "double" + }, + "crossRegionReplicaRate": { + "type": "number", + "description": "Cross-region replica price as a fraction of the specification cost.", + "x-example": 0.75, + "format": "double" + }, + "crossRegionRate": { + "type": "number", + "description": "Cross-region transfer price as a fraction of the specification cost.", + "x-example": 0.5, + "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": [ + "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", @@ -105572,271 +107821,6 @@ "credits": null } }, - "dedicatedDatabaseUsage": { - "description": "DedicatedDatabase", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "provisionedCpu": { - "type": "number", - "description": "Provisioned CPU cores for the database specification.", - "x-example": 2, - "format": "double" - }, - "provisionedMemoryBytes": { - "type": "integer", - "description": "Provisioned memory in bytes for the database specification.", - "x-example": 4294967296, - "format": "int32" - }, - "provisionedStorageBytes": { - "type": "integer", - "description": "Provisioned storage in bytes for the database specification.", - "x-example": 107374182400, - "format": "int32" - }, - "provisionedConnections": { - "type": "integer", - "description": "Maximum concurrent connections allowed by the database specification.", - "x-example": 200, - "format": "int32" - }, - "computeTotal": { - "type": "integer", - "description": "Total aggregated compute time in milliseconds.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound network traffic in bytes.", - "x-example": 0, - "format": "int32" - }, - "connectionsTotal": { - "type": "integer", - "description": "Total aggregated number of database connections.", - "x-example": 0, - "format": "int32" - }, - "coldStartsTotal": { - "type": "integer", - "description": "Total aggregated number of cold starts.", - "x-example": 0, - "format": "int32" - }, - "cpuTotal": { - "type": "number", - "description": "Latest CPU usage percent (0-100).", - "x-example": 45.2, - "format": "double" - }, - "memoryTotal": { - "type": "number", - "description": "Latest memory usage percent (0-100).", - "x-example": 62.1, - "format": "double" - }, - "qpsTotal": { - "type": "number", - "description": "Latest queries per second.", - "x-example": 230.7, - "format": "double" - }, - "iopsReadTotal": { - "type": "number", - "description": "Latest read IOPS.", - "x-example": 125.5, - "format": "double" - }, - "iopsWriteTotal": { - "type": "number", - "description": "Latest write IOPS.", - "x-example": 45.3, - "format": "double" - }, - "compute": { - "type": "array", - "description": "Aggregated compute time per period in milliseconds.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "inbound": { - "type": "array", - "description": "Aggregated inbound network traffic per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "outbound": { - "type": "array", - "description": "Aggregated outbound network traffic per period in bytes.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "connections": { - "type": "array", - "description": "Aggregated number of database connections per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "coldStarts": { - "type": "array", - "description": "Aggregated number of cold starts per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "cpu": { - "type": "array", - "description": "CPU usage percent per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "memory": { - "type": "array", - "description": "Memory usage percent per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "qps": { - "type": "array", - "description": "Queries per second per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "iopsRead": { - "type": "array", - "description": "Read IOPS per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, - "iopsWrite": { - "type": "array", - "description": "Write IOPS per period.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "range", - "provisionedCpu", - "provisionedMemoryBytes", - "provisionedStorageBytes", - "provisionedConnections", - "computeTotal", - "storageTotal", - "inboundTotal", - "outboundTotal", - "connectionsTotal", - "coldStartsTotal", - "cpuTotal", - "memoryTotal", - "qpsTotal", - "iopsReadTotal", - "iopsWriteTotal", - "compute", - "storage", - "inbound", - "outbound", - "connections", - "coldStarts", - "cpu", - "memory", - "qps", - "iopsRead", - "iopsWrite" - ], - "example": { - "$id": "5e5ea5c16897e", - "range": "30d", - "provisionedCpu": 2, - "provisionedMemoryBytes": 4294967296, - "provisionedStorageBytes": 107374182400, - "provisionedConnections": 200, - "computeTotal": 0, - "storageTotal": 0, - "inboundTotal": 0, - "outboundTotal": 0, - "connectionsTotal": 0, - "coldStartsTotal": 0, - "cpuTotal": 45.2, - "memoryTotal": 62.1, - "qpsTotal": 230.7, - "iopsReadTotal": 125.5, - "iopsWriteTotal": 45.3, - "compute": [], - "storage": [], - "inbound": [], - "outbound": [], - "connections": [], - "coldStarts": [], - "cpu": [], - "memory": [], - "qps": [], - "iopsRead": [], - "iopsWrite": [] - } - }, "usageEvent": { "description": "usageEvent", "type": "object", @@ -105937,17 +107921,31 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" } }, "usageOrganization": { @@ -106502,6 +108500,250 @@ "resourceId": "" } }, + "app": { + "description": "App", + "type": "object", + "properties": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "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" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "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" + }, + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] + } + }, + "appSecret": { + "description": "AppSecret", + "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": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + }, + "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", + "x-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": "$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" + } + }, + "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": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked 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", + "x-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" + } + }, "activityEventList": { "description": "Activity event list", "type": "object", @@ -106792,35 +109034,6 @@ "blocks": "" } }, - "dedicatedDatabaseAuditLogList": { - "description": "Dedicated database audit logs list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of auditLogs that matched your query.", - "x-example": 5, - "format": "int32" - }, - "auditLogs": { - "type": "array", - "description": "List of auditLogs.", - "items": { - "type": "object", - "$ref": "#\/definitions\/dedicatedDatabaseAuditLog" - }, - "x-example": "" - } - }, - "required": [ - "total", - "auditLogs" - ], - "example": { - "total": 5, - "auditLogs": "" - } - }, "dedicatedDatabaseConnectionList": { "description": "Dedicated database connections list", "type": "object", @@ -107139,6 +109352,64 @@ "total": 5, "gauges": "" } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "type": "object", + "$ref": "#\/definitions\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" + } } }, "externalDocs": { diff --git a/specs/latest/swagger2-latest-server.json b/specs/latest/swagger2-latest-server.json index c11c712ba..eac966fce 100644 --- a/specs/latest/swagger2-latest-server.json +++ b/specs/latest/swagger2-latest-server.json @@ -38,6 +38,15 @@ "demo": "" } }, + "ProjectQuery": { + "type": "apiKey", + "name": "project", + "description": "Your project ID", + "in": "query", + "x-appwrite": { + "demo": "" + } + }, "Key": { "type": "apiKey", "name": "X-Appwrite-Key", @@ -223,7 +232,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -234,7 +246,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -1928,11 +1941,12 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" }, "oldPassword": { "type": "string", - "description": "Current user password. Must be at least 8 chars.", + "description": "Current user password. Max length: 256 chars.", "default": "", "x-example": "password", "format": "password" @@ -2310,7 +2324,8 @@ "password": { "type": "string", "description": "New user password. Must be between 8 and 256 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -2628,7 +2643,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2712,7 +2730,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -2792,7 +2813,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "secret": { "type": "string", @@ -3114,7 +3138,10 @@ "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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3204,7 +3231,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -3484,7 +3514,10 @@ "userId": { "type": "string", "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "phone": { "type": "string", @@ -4025,6 +4058,856 @@ ] } }, + "\/apps": { + "get": { + "summary": "List Applications", + "operationId": "appsList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "List applications.", + "responses": { + "200": { + "description": "Apps list", + "schema": { + "$ref": "#\/definitions\/appsList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "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, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Application", + "operationId": "appsCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Create a new application.", + "responses": { + "201": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/create.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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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": "Application name.", + "x-example": "" + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "x-example": null, + "items": { + "type": "string" + } + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId", + "name", + "redirectUris" + ] + } + } + ] + } + }, + "\/apps\/{appId}": { + "get": { + "summary": "Get Application", + "operationId": "appsGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Get an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "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, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Application", + "operationId": "appsUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Update an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update.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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "redirectUris": { + "type": "array", + "description": "Redirect URIs (array of valid URLs).", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "description": "OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` \u2014 PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.", + "default": "confidential", + "x-example": "public" + }, + "deviceFlow": { + "type": "boolean", + "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 + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete Application", + "operationId": "appsDelete", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete.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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "List client secrets for an application.", + "responses": { + "200": { + "description": "App secrets list", + "schema": { + "$ref": "#\/definitions\/appSecretList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSecrets", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "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, + "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, + "type": "array", + "collectionFormat": "multi", + "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, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Create a new client secret for an application.", + "responses": { + "201": { + "description": "AppSecretPlaintext", + "schema": { + "$ref": "#\/definitions\/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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "schema": { + "$ref": "#\/definitions\/appSecret" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "apps.read", + "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, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "schema": { + "$ref": "#\/definitions\/app" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": null, + "cookies": false, + "type": "", + "demo": "apps\/update-team.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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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": null, + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.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": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/avatars\/browsers\/{code}": { "get": { "summary": "Get browser icon", @@ -4066,7 +4949,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4074,7 +4958,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4193,7 +5078,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4201,7 +5087,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4326,7 +5213,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4334,7 +5222,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4391,7 +5280,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4399,7 +5289,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4880,7 +5771,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4888,7 +5780,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -4965,7 +5858,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -4973,7 +5867,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5058,7 +5953,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5066,7 +5962,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -5151,7 +6048,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -5159,7 +6057,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -6406,6 +7305,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6415,6 +7315,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -6548,6 +7449,9 @@ "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, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -6684,7 +7588,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -6703,6 +7610,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6712,6 +7620,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -6968,6 +7877,9 @@ "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, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -7048,6 +7960,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7057,6 +7970,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -7066,7 +7980,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "newResourceName": { "type": "string", @@ -7423,7 +8340,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -8345,7 +9265,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -13408,7 +14331,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -13999,6 +14925,9 @@ "description": "Document ID.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" }, @@ -15014,7 +15943,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -15026,6 +15958,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -15827,7 +16765,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -16379,7 +17320,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -17916,7 +18860,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -18023,7 +18970,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -18274,9 +19221,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -18371,9 +19321,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -18784,7 +19737,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -19035,9 +19988,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -19132,9 +20088,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -20005,14 +20964,16 @@ "public": true, "auth": { "Project": [], - "Key": [] + "Key": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -20216,7 +21177,7 @@ "application\/json" ], "produces": [ - "multipart\/form-data" + "application\/json" ], "tags": [ "functions" @@ -20627,7 +21588,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -21136,6 +22100,57 @@ ] } }, + "\/health\/audits-db": { + "get": { + "summary": "Get audits DB", + "operationId": "healthGetAuditsDB", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "health" + ], + "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", + "responses": { + "200": { + "description": "Status List", + "schema": { + "$ref": "#\/definitions\/healthStatusList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuditsDB", + "group": null, + "cookies": false, + "type": "", + "demo": "health\/get-audits-db.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\/health\/get-audits-db.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, "\/health\/cache": { "get": { "summary": "Get cache", @@ -23375,7 +24390,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "subject": { "type": "string", @@ -23689,7 +24707,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "title": { "type": "string", @@ -24163,7 +25184,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "content": { "type": "string", @@ -24907,7 +25931,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25273,7 +26300,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25519,7 +26549,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25658,54 +26691,261 @@ "default": "", "x-example": "" }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "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": "" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "" + } + } + } + } + ] + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Create a new MSG91 provider.", + "responses": { + "201": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMsg91Provider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-msg-91-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-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + ] + } + }, + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "messaging" + ], + "description": "Update a MSG91 provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "schema": { + "$ref": "#\/definitions\/provider" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMsg91Provider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-msg-91-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-msg91-provider.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "" + }, "enabled": { "type": "boolean", "description": "Set as enabled.", "x-example": false, "x-nullable": true }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "" - }, - "fromEmail": { + "templateId": { "type": "string", - "description": "Sender email address.", + "description": "Msg91 template ID.", "default": "", - "x-example": "email@example.com", - "format": "email" + "x-example": "" }, - "replyToName": { + "senderId": { "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", + "description": "Msg91 sender ID.", "default": "", - "x-example": "" + "x-example": "" }, - "replyToEmail": { + "authKey": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", + "description": "Msg91 auth key.", "default": "", - "x-example": "" + "x-example": "" } } } @@ -25713,10 +26953,10 @@ ] } }, - "\/messaging\/providers\/msg91": { + "\/messaging\/providers\/resend": { "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", "consumes": [ "application\/json" ], @@ -25726,7 +26966,7 @@ "tags": [ "messaging" ], - "description": "Create a new MSG91 provider.", + "description": "Create a new Resend provider.", "responses": { "201": { "description": "Provider", @@ -25737,11 +26977,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMsg91Provider", + "method": "createResendProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/create-msg-91-provider.md", + "demo": "messaging\/create-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25752,7 +26992,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -25774,30 +27014,47 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", "description": "Provider name.", "x-example": "" }, - "templateId": { + "apiKey": { "type": "string", - "description": "Msg91 template ID", + "description": "Resend API key.", "default": "", - "x-example": "" + "x-example": "" }, - "senderId": { + "fromName": { "type": "string", - "description": "Msg91 sender ID.", + "description": "Sender Name.", "default": "", - "x-example": "" + "x-example": "" }, - "authKey": { + "fromEmail": { "type": "string", - "description": "Msg91 auth key.", + "description": "Sender email address.", "default": "", - "x-example": "" + "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": "" + }, + "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", @@ -25815,10 +27072,10 @@ ] } }, - "\/messaging\/providers\/msg91\/{providerId}": { + "\/messaging\/providers\/resend\/{providerId}": { "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", "consumes": [ "application\/json" ], @@ -25828,7 +27085,7 @@ "tags": [ "messaging" ], - "description": "Update a MSG91 provider by its unique ID.", + "description": "Update a Resend provider by its unique ID.", "responses": { "200": { "description": "Provider", @@ -25839,11 +27096,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMsg91Provider", + "method": "updateResendProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/update-msg-91-provider.md", + "demo": "messaging\/update-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25854,7 +27111,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -25893,23 +27150,36 @@ "x-example": false, "x-nullable": true }, - "templateId": { + "apiKey": { "type": "string", - "description": "Msg91 template ID.", + "description": "Resend API key.", "default": "", - "x-example": "" + "x-example": "" }, - "senderId": { + "fromName": { "type": "string", - "description": "Msg91 sender ID.", + "description": "Sender Name.", "default": "", - "x-example": "" + "x-example": "" }, - "authKey": { + "fromEmail": { "type": "string", - "description": "Msg91 auth key.", + "description": "Sender email address.", "default": "", - "x-example": "" + "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": "" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "" } } } @@ -25917,10 +27187,10 @@ ] } }, - "\/messaging\/providers\/resend": { + "\/messaging\/providers\/sendgrid": { "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", "consumes": [ "application\/json" ], @@ -25930,7 +27200,7 @@ "tags": [ "messaging" ], - "description": "Create a new Resend provider.", + "description": "Create a new Sendgrid provider.", "responses": { "201": { "description": "Provider", @@ -25941,11 +27211,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createResendProvider", + "method": "createSendgridProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/create-resend-provider.md", + "demo": "messaging\/create-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -25956,7 +27226,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "auth": { "Project": [], "Key": [] @@ -25978,7 +27248,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -25987,7 +27260,7 @@ }, "apiKey": { "type": "string", - "description": "Resend API key.", + "description": "Sendgrid API key.", "default": "", "x-example": "" }, @@ -26033,10 +27306,10 @@ ] } }, - "\/messaging\/providers\/resend\/{providerId}": { + "\/messaging\/providers\/sendgrid\/{providerId}": { "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", "consumes": [ "application\/json" ], @@ -26046,7 +27319,7 @@ "tags": [ "messaging" ], - "description": "Update a Resend provider by its unique ID.", + "description": "Update a Sendgrid provider by its unique ID.", "responses": { "200": { "description": "Provider", @@ -26057,11 +27330,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateResendProvider", + "method": "updateSendgridProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/update-resend-provider.md", + "demo": "messaging\/update-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26072,7 +27345,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "auth": { "Project": [], "Key": [] @@ -26113,7 +27386,7 @@ }, "apiKey": { "type": "string", - "description": "Resend API key.", + "description": "Sendgrid API key.", "default": "", "x-example": "" }, @@ -26148,10 +27421,10 @@ ] } }, - "\/messaging\/providers\/sendgrid": { + "\/messaging\/providers\/ses": { "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", "consumes": [ "application\/json" ], @@ -26161,7 +27434,7 @@ "tags": [ "messaging" ], - "description": "Create a new Sendgrid provider.", + "description": "Create a new Amazon SES provider.", "responses": { "201": { "description": "Provider", @@ -26172,11 +27445,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSendgridProvider", + "method": "createSesProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/create-sendgrid-provider.md", + "demo": "messaging\/create-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26187,7 +27460,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -26209,18 +27482,33 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", "description": "Provider name.", "x-example": "" }, - "apiKey": { + "accessKey": { "type": "string", - "description": "Sendgrid API key.", + "description": "AWS access key ID.", "default": "", - "x-example": "" + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" }, "fromName": { "type": "string", @@ -26264,10 +27552,10 @@ ] } }, - "\/messaging\/providers\/sendgrid\/{providerId}": { + "\/messaging\/providers\/ses\/{providerId}": { "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", "consumes": [ "application\/json" ], @@ -26277,7 +27565,7 @@ "tags": [ "messaging" ], - "description": "Update a Sendgrid provider by its unique ID.", + "description": "Update an Amazon SES provider by its unique ID.", "responses": { "200": { "description": "Provider", @@ -26288,11 +27576,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSendgridProvider", + "method": "updateSesProvider", "group": "providers", "cookies": false, "type": "", - "demo": "messaging\/update-sendgrid-provider.md", + "demo": "messaging\/update-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -26303,7 +27591,7 @@ ], "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\/messaging\/update-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -26342,11 +27630,23 @@ "x-example": false, "x-nullable": true }, - "apiKey": { + "accessKey": { "type": "string", - "description": "Sendgrid API key.", + "description": "AWS access key ID.", "default": "", - "x-example": "" + "x-example": "" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "" }, "fromName": { "type": "string", @@ -26528,7 +27828,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -26557,7 +27860,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -26809,7 +28113,8 @@ "type": "string", "description": "Authentication password.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "encryption": { "type": "string", @@ -26937,7 +28242,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27142,7 +28450,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27347,7 +28658,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -27552,7 +28866,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -28119,7 +29436,10 @@ "topicId": { "type": "string", "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -28592,7 +29912,10 @@ "subscriberId": { "type": "string", "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "targetId": { "type": "string", @@ -28676,71 +29999,544 @@ "in": "path" } ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + }, + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "messaging" + ], + "description": "Delete a subscriber by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSubscriber", + "group": "subscribers", + "cookies": false, + "type": "", + "demo": "messaging\/delete-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "subscribers.write", + "platforms": [ + "server", + "client", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", + "auth": { + "Project": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "consumes": [ "application\/json" ], - "produces": [], + "produces": [ + "application\/json" + ], "tags": [ - "messaging" + "oauth2" ], - "description": "Delete a subscriber 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": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2 Approve", + "schema": { + "$ref": "#\/definitions\/oauth2Approve" + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", + "method": "approve", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/delete-subscriber.md", + "demo": "oauth2\/approve.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "oauth2.write", "platforms": [ - "server", "client", - "console" + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectQuery": [], + "Session": [] + } + }, + "security": [ + { + "ProjectQuery": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + ] + } + }, + "\/oauth2\/{project_id}\/authorize": { + "get": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", + "consumes": [], + "produces": [ + "application\/json" + ], + "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", + "schema": { + "$ref": "#\/definitions\/oauth2Authorize" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "authorize", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/authorize.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectQuery": [], + "Session": [] + } + }, + "security": [ + { + "ProjectQuery": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "client_id", + "description": "OAuth2 client ID.", + "required": true, + "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, + "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, + "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, + "type": "string", + "x-example": "", + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "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, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "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, + "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, + "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, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + } + }, + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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", + "schema": { + "$ref": "#\/definitions\/oauth2Grant" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createGrant", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "user_code": { + "type": "string", + "description": "User code displayed on the device.", + "x-example": "" + } + }, + "required": [ + "user_code" + ] + } + } + ] + } + }, + "\/oauth2\/{project_id}\/grants\/{grant_id}": { + "get": { + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", + "consumes": [], + "produces": [ + "application\/json" + ], + "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", + "schema": { + "$ref": "#\/definitions\/oauth2Grant" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getGrant", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/get-grant.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } }, "security": [ { "Project": [], - "JWT": [], "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", "required": true, "type": "string", - "x-example": "", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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", + "schema": { + "$ref": "#\/definitions\/oauth2Reject" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "reject", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/reject.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectQuery": [], + "Session": [] + } + }, + "security": [ + { + "ProjectQuery": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "type": "string", + "x-example": "", "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "grant_id": { + "type": "string", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "" + } + }, + "required": [ + "grant_id" + ] + } } ] } @@ -28876,7 +30672,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -29719,7 +31518,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29854,14 +31654,15 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", "methods": [ { - "name": "updatePresence", + "name": "update", "namespace": "presences", "desc": "Update presence", "auth": { @@ -29888,7 +31689,7 @@ } ], "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-presence.md", + "demo": "presences\/update.md", "public": true } ], @@ -30341,7 +32142,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -30445,9 +32249,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -30542,9 +32349,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -30721,9 +32531,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -30818,9 +32631,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -31066,9 +32882,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -31163,9 +32982,12 @@ "archives.write", "restorations.read", "restorations.write", + "dedicatedDatabases.execute", "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -31583,53 +33405,114 @@ "format": "phone", "x-example": "+12065550100", "in": "path" - }, - { - "name": "payload", - "in": "body", - "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": "" - } - }, - "required": [ - "otp" - ] - } + }, + { + "name": "payload", + "in": "body", + "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": "" + } + }, + "required": [ + "otp" + ] + } + } + ] + }, + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [], + "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, + "type": "string", + "format": "phone", + "x-example": "+12065550100", + "in": "path" } ] - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "consumes": [ + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "consumes": [], + "produces": [ "application\/json" ], - "produces": [], "tags": [ "project" ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the 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.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2 Providers List", + "schema": { + "$ref": "#\/definitions\/oAuth2ProviderList" + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", + "method": "listOAuth2Providers", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/delete-mock-phone.md", + "demo": "project\/list-o-auth-2-providers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", + "scope": "oauth2.read", "platforms": [ "console", "server" @@ -31649,48 +33532,62 @@ ], "parameters": [ { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "type": "string", - "format": "phone", - "x-example": "+12065550100", - "in": "path" + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "type": "boolean", + "x-example": false, + "default": true, + "in": "query" } ] } }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "consumes": [], + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", + "consumes": [ + "application\/json" + ], "produces": [ "application\/json" ], "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 OAuth2 server (OIDC provider) configuration.", "responses": { "200": { - "description": "OAuth2 Providers List", + "description": "Project", "schema": { - "$ref": "#\/definitions\/oAuth2ProviderList" + "$ref": "#\/definitions\/project" } } }, "deprecated": false, "x-appwrite": { - "method": "listOAuth2Providers", - "group": "oauth2", + "method": "updateOAuth2Server", + "group": null, "cookies": false, "type": "", - "demo": "project\/list-o-auth-2-providers.md", + "demo": "project\/update-o-auth-2-server.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.write", "platforms": [ "console", "server" @@ -31710,25 +33607,107 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "type": "boolean", - "x-example": false, - "default": true, - "in": "query" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the OAuth2 server.", + "x-example": false + }, + "authorizationUrl": { + "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", + "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 + }, + "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" + }, + "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" + ] + } } ] } @@ -35702,7 +37681,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -35870,7 +37852,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -36038,7 +38023,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -36206,7 +38194,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -36374,7 +38365,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -37005,6 +38999,11 @@ "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 } } } @@ -37222,15 +39221,107 @@ "schema": { "type": "object", "properties": { - "enabled": { + "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" + ] + } + } + ] + } + }, + "\/project\/policies\/password-strength": { + "patch": { + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "project" + ], + "description": "Update the password strength requirements for users in the project.", + "responses": { + "200": { + "description": "Policy Password Strength", + "schema": { + "$ref": "#\/definitions\/policyPasswordStrength" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePasswordStrengthPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "project\/update-password-strength-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": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "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": "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.", + "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 } - }, - "required": [ - "enabled" - ] + } } } ] @@ -37625,7 +39716,7 @@ "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", "responses": { "200": { - "description": "Policy Password Dictionary, or Policy Password History, 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", + "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", "schema": { "x-oneOf": [ { @@ -37634,6 +39725,9 @@ { "$ref": "#\/definitions\/policyPasswordHistory" }, + { + "$ref": "#\/definitions\/policyPasswordStrength" + }, { "$ref": "#\/definitions\/policyPasswordPersonalData" }, @@ -37654,6 +39748,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -37661,13 +39764,17 @@ "mapping": { "password-dictionary": "#\/definitions\/policyPasswordDictionary", "password-history": "#\/definitions\/policyPasswordHistory", + "password-strength": "#\/definitions\/policyPasswordStrength", "password-personal-data": "#\/definitions\/policyPasswordPersonalData", "session-alert": "#\/definitions\/policySessionAlert", "session-duration": "#\/definitions\/policySessionDuration", "session-invalidation": "#\/definitions\/policySessionInvalidation", "session-limit": "#\/definitions\/policySessionLimit", "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + "membership-privacy": "#\/definitions\/policyMembershipPrivacy", + "deny-aliased-email": "#\/definitions\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/definitions\/policyDenyDisposableEmail", + "deny-free-email": "#\/definitions\/policyDenyFreeEmail" } } } @@ -37707,32 +39814,40 @@ "parameters": [ { "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.", + "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.", "required": true, "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" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-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" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "in": "path" } @@ -37882,7 +39997,7 @@ "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", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, documentsDB, tablesDB, vectorsDB, locale, health, project, storage, teams, users, vcs, webhooks, tokens, presences, sites, functions, proxy, graphql, migrations, messaging, advisor", "required": true, "type": "string", "x-example": "account", @@ -37891,6 +40006,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -37898,6 +40016,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -37912,6 +40033,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -37919,6 +40043,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -38028,7 +40155,8 @@ "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": "", + "x-example": "password", + "format": "password", "x-nullable": true }, "senderEmail": { @@ -39109,7 +41237,10 @@ "variableId": { "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -39569,7 +41700,7 @@ }, "\/proxy\/rules\/redirect": { "post": { - "summary": "Create Redirect rule", + "summary": "Create redirect rule", "operationId": "proxyCreateRedirectRule", "consumes": [ "application\/json" @@ -39645,7 +41776,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -40427,7 +42558,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -40455,7 +42589,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -40617,7 +42751,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime", + "x-enum-name": "BuildRuntime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -40723,7 +42857,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -41063,7 +43197,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -41225,7 +43359,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime", + "x-enum-name": "BuildRuntime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -41331,7 +43465,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -42215,14 +44349,16 @@ "public": true, "auth": { "Project": [], - "Key": [] + "Key": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -42694,7 +44830,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "key": { "type": "string", @@ -43091,7 +45230,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -43608,6 +45750,9 @@ "required": true, "x-upload-id": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "formData" }, @@ -43908,7 +46053,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -43916,7 +46062,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -43989,7 +46136,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -43997,7 +46145,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -44215,7 +46364,8 @@ "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { "Project": [], - "Session": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ @@ -44223,7 +46373,8 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ @@ -44397,7 +46548,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -45232,7 +47386,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -46227,7 +48384,7 @@ }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { - "summary": "Update dateTime column", + "summary": "Update datetime column", "operationId": "tablesDBUpdateDatetimeColumn", "consumes": [ "application\/json" @@ -50756,7 +52913,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -51966,7 +54126,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -53328,7 +55491,7 @@ "tags": [ "usage" ], - "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, and timestamp. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", + "description": "Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc(\"time\"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable \u2014 pass `total=false` to skip the count entirely.", "responses": { "200": { "description": "Usage gauges list", @@ -53532,7 +55695,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53552,7 +55718,8 @@ "type": "string", "description": "Plain text user password. Must be at least 8 chars.", "default": "", - "x-example": null + "x-example": "password", + "format": "password" }, "name": { "type": "string", @@ -53630,7 +55797,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53722,7 +55892,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -53955,7 +56128,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -54047,7 +56223,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -54139,7 +56318,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -54265,7 +56447,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -54375,7 +56560,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "email": { "type": "string", @@ -55957,7 +58145,8 @@ "password": { "type": "string", "description": "New user password. Must be at least 8 chars.", - "x-example": null + "x-example": "password", + "format": "password" } }, "required": [ @@ -56320,6 +58509,9 @@ "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" } @@ -56564,7 +58756,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56646,7 +58838,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56683,7 +58875,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "providerType": { "type": "string", @@ -56759,7 +58954,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56828,7 +59023,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56919,7 +59114,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -57337,7 +59532,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -57349,6 +59547,12 @@ "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 defining compute resources (CPU, memory). Defaults to the free tier. Must be enabled on the organization plan.", + "default": "free", + "x-example": "" } }, "required": [ @@ -57362,7 +59566,7 @@ }, "\/vectorsdb\/embeddings\/text": { "post": { - "summary": "Create Text Embeddings", + "summary": "Create text embeddings", "operationId": "vectorsDBCreateTextEmbeddings", "consumes": [ "application\/json" @@ -57457,14 +59661,20 @@ "model": { "type": "string", "description": "The embedding model to use for generating vector embeddings.", - "default": "embeddinggemma", - "x-example": "embeddinggemma", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", "enum": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ], "x-enum-name": "EmbeddingModel", "x-enum-keys": [ - "embeddinggemma" + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" ] } }, @@ -58267,7 +60477,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "name": { "type": "string", @@ -58807,7 +61020,10 @@ "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-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "data": { "type": "object", @@ -59365,6 +61581,9 @@ "description": "Document ID.", "required": true, "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "", "in": "path" }, @@ -60109,7 +62328,10 @@ "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": "" + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, "url": { "type": "string", @@ -60151,7 +62373,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" }, "secret": { "type": "string", @@ -60334,7 +62557,8 @@ "type": "string", "description": "Webhook HTTP password. Max length: 256 chars.", "default": "", - "x-example": "" + "x-example": "password", + "format": "password" } }, "required": [ @@ -60497,6 +62721,18 @@ "name": "tablesdb", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, + { + "name": "documentsDB", + "description": "The DocumentsDB 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": "vectorsDB", + "description": "The VectorsDB service allows you to create vector collections, embeddings, indexes, and documents." + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -60525,6 +62761,18 @@ "name": "users", "description": "The Users service allows you to manage your project users." }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to configure event-driven HTTP callbacks for your project." + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for project resources." + }, + { + "name": "presences", + "description": "The Presences service allows you to create, query, and manage realtime presence state." + }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." @@ -60545,6 +62793,10 @@ "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." @@ -61529,7 +63781,7 @@ "total": { "type": "integer", "description": "Total number of policies in the given project.", - "x-example": 9, + "x-example": 10, "format": "int32" }, "policies": { @@ -61543,6 +63795,9 @@ { "$ref": "#\/definitions\/policyPasswordHistory" }, + { + "$ref": "#\/definitions\/policyPasswordStrength" + }, { "$ref": "#\/definitions\/policyPasswordPersonalData" }, @@ -61563,6 +63818,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -61570,13 +63834,17 @@ "mapping": { "password-dictionary": "#\/definitions\/policyPasswordDictionary", "password-history": "#\/definitions\/policyPasswordHistory", + "password-strength": "#\/definitions\/policyPasswordStrength", "password-personal-data": "#\/definitions\/policyPasswordPersonalData", "session-alert": "#\/definitions\/policySessionAlert", "session-duration": "#\/definitions\/policySessionDuration", "session-invalidation": "#\/definitions\/policySessionInvalidation", "session-limit": "#\/definitions\/policySessionLimit", "user-limit": "#\/definitions\/policyUserLimit", - "membership-privacy": "#\/definitions\/policyMembershipPrivacy" + "membership-privacy": "#\/definitions\/policyMembershipPrivacy", + "deny-aliased-email": "#\/definitions\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/definitions\/policyDenyDisposableEmail", + "deny-free-email": "#\/definitions\/policyDenyFreeEmail" } } }, @@ -61588,7 +63856,7 @@ "policies" ], "example": { - "total": 9, + "total": 10, "policies": "" } }, @@ -62114,7 +64382,7 @@ "model": { "type": "string", "description": "Embedding model used to generate embeddings.", - "x-example": "embeddinggemma" + "x-example": "nomic-embed-text" }, "dimension": { "type": "integer", @@ -62148,7 +64416,7 @@ "error" ], "example": { - "model": "embeddinggemma", + "model": "nomic-embed-text", "dimension": 768, "embedding": [ 0.01, @@ -67068,10 +69336,16 @@ "description": "Presence expiry date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00", "x-nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, - "additionalProperties": true, - "x-additional-properties-key": "metadata", "required": [ "$id", "$createdAt", @@ -67090,7 +69364,10 @@ "userId": "674af8f3e12a5f9ac0be", "status": "online", "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, "log": { @@ -67376,6 +69653,36 @@ "description": "Email verification status.", "x-example": true }, + "emailCanonical": { + "type": "string", + "description": "Canonical form of the user email address.", + "x-example": "john@appwrite.io", + "x-nullable": true + }, + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "x-example": true, + "x-nullable": true + }, + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "x-example": false, + "x-nullable": true + }, + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "x-example": true, + "x-nullable": true + }, + "emailIsCanonical": { + "type": "boolean", + "description": "Whether the user email is in its canonical form.", + "x-example": true, + "x-nullable": true + }, "phoneVerification": { "type": "boolean", "description": "Phone verification status.", @@ -67460,6 +69767,11 @@ "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": { @@ -68566,6 +70878,11 @@ "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", @@ -68591,6 +70908,7 @@ "joined", "confirm", "mfa", + "userAccessedAt", "roles" ], "example": { @@ -68607,6 +70925,7 @@ "joined": "2020-10-15T06:38:00.000+00:00", "confirm": false, "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", "roles": [ "owner" ] @@ -69760,6 +72079,11 @@ "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.", @@ -69813,7 +72137,8 @@ "smtpPassword": { "type": "string", "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "" + "x-example": "smtp-password", + "format": "password" }, "smtpSecure": { "type": "string", @@ -69873,10 +72198,19 @@ }, "x-example": {} }, - "region": { + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "type": "object", + "$ref": "#\/definitions\/block" + }, + "x-example": "" + }, + "consoleAccessedAt": { "type": "string", - "description": "Project region", - "x-example": "fra" + "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" }, "billingLimits": { "type": "object", @@ -69888,19 +72222,92 @@ }, "x-nullable": true }, - "blocks": { + "oAuth2ServerEnabled": { + "type": "boolean", + "description": "OAuth2 server status", + "x-example": false + }, + "oAuth2ServerAuthorizationUrl": { + "type": "string", + "description": "OAuth2 server authorization URL", + "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration" + }, + "oAuth2ServerScopes": { "type": "array", - "description": "Project blocks information", + "description": "OAuth2 server allowed scopes", "items": { - "type": "object", - "$ref": "#\/definitions\/block" + "type": "string" }, - "x-example": "" + "x-example": [ + "read", + "write" + ] }, - "consoleAccessedAt": { + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "x-example": [ + "calendar" + ] + }, + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "x-example": 86400, + "format": "int32" + }, + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 3600, + "format": "int32" + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 2592000, + "format": "int32" + }, + "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 + }, + "oAuth2ServerVerificationUrl": { "type": "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" + "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" + }, + "oAuth2ServerUserCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "x-example": 8, + "format": "int32" + }, + "oAuth2ServerUserCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "x-example": "alphanumeric" + }, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "x-example": 600, + "format": "int32" + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -69909,6 +72316,7 @@ "$updatedAt", "name", "teamId", + "region", "devKeys", "smtpEnabled", "smtpSenderName", @@ -69927,9 +72335,22 @@ "authMethods", "services", "protocols", - "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAuthorizationDetailsTypes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerVerificationUrl", + "oAuth2ServerUserCodeLength", + "oAuth2ServerUserCodeFormat", + "oAuth2ServerDeviceCodeDuration", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -69937,6 +72358,7 @@ "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "New Project", "teamId": "1592981250", + "region": "fra", "devKeys": {}, "smtpEnabled": false, "smtpSenderName": "John Appwrite", @@ -69946,7 +72368,7 @@ "smtpHost": "mail.appwrite.io", "smtpPort": 25, "smtpUsername": "emailuser", - "smtpPassword": "", + "smtpPassword": "smtp-password", "smtpSecure": "tls", "pingCount": 1, "pingedAt": "2020-10-15T06:38:00.000+00:00", @@ -69957,10 +72379,28 @@ "authMethods": {}, "services": {}, "protocols": {}, - "region": "fra", - "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "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" } }, "projectAuthMethod": { @@ -70010,6 +72450,9 @@ "avatars", "databases", "tablesdb", + "documentsDB", + "tablesDB", + "vectorsDB", "locale", "health", "project", @@ -70017,6 +72460,9 @@ "teams", "users", "vcs", + "webhooks", + "tokens", + "presences", "sites", "functions", "proxy", @@ -70125,7 +72571,8 @@ "authPassword": { "type": "string", "description": "HTTP basic authentication password.", - "x-example": "password" + "x-example": "webhook-password", + "format": "password" }, "secret": { "type": "string", @@ -70176,7 +72623,7 @@ ], "tls": true, "authUsername": "username", - "authPassword": "password", + "authPassword": "webhook-password", "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", @@ -72337,6 +74784,59 @@ "total": 5 } }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "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": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": true + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": true + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": true + } + }, + "required": [ + "$id", + "min", + "uppercase", + "lowercase", + "number", + "symbols" + ], + "example": { + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true + } + }, "policyPasswordPersonalData": { "description": "Policy Password Personal Data", "type": "object", @@ -72517,6 +75017,11 @@ "type": "boolean", "description": "Whether user MFA status is visible in memberships.", "x-example": true + }, + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "x-example": true } }, "required": [ @@ -72525,7 +75030,8 @@ "userEmail", "userPhone", "userName", - "userMFA" + "userMFA", + "userAccessedAt" ], "example": { "$id": "password-dictionary", @@ -72533,7 +75039,8 @@ "userEmail": true, "userPhone": true, "userName": true, - "userMFA": true + "userMFA": true, + "userAccessedAt": true } }, "platformWeb": { @@ -74587,66 +77094,6 @@ "description": "Hostname.", "x-example": "appwrite.io" }, - "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.", @@ -74677,18 +77124,6 @@ "projectId", "teamId", "hostname", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", "countryCode", "countryName" ], @@ -74711,18 +77146,6 @@ "projectId": "610fc2f985ee0", "teamId": "610fc2f985ee0", "hostname": "appwrite.io", - "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" } @@ -75074,6 +77497,78 @@ "enabled": true } }, + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "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": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, "backupRestoration": { "description": "Restoration", "type": "object", @@ -75267,17 +77762,432 @@ "type": "string", "description": "The snapshot timestamp.", "x-example": "2026-04-09T12:00:00.000+00:00" + }, + "resourceType": { + "type": "string", + "description": "The resource type.", + "x-example": "dedicatedDatabases" + }, + "resourceId": { + "type": "string", + "description": "The resource ID.", + "x-example": "production" } }, "required": [ "metric", "value", - "time" + "time", + "resourceType", + "resourceId" ], "example": { "metric": "users", "value": 1500, - "time": "2026-04-09T12:00:00.000+00:00" + "time": "2026-04-09T12:00:00.000+00:00", + "resourceType": "dedicatedDatabases", + "resourceId": "production" + } + }, + "app": { + "description": "App", + "type": "object", + "properties": { + "$id": { + "type": "string", + "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": "Application name.", + "x-example": "My Application" + }, + "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" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "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" + }, + "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" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "redirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "secrets" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "secrets": [] + } + }, + "appSecret": { + "description": "AppSecret", + "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": "Hashed application client secret.", + "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + }, + "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", + "x-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": "$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" + } + }, + "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": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked 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", + "x-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": "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" + } + }, + "oauth2Grant": { + "description": "OAuth2 Grant", + "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" + }, + "scopes": { + "type": "array", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] + }, + "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", + "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" + ], + "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" } }, "activityEventList": { @@ -75453,6 +78363,64 @@ "total": 5, "gauges": "" } + }, + "appsList": { + "description": "Apps list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of apps that matched your query.", + "x-example": 5, + "format": "int32" + }, + "apps": { + "type": "array", + "description": "List of apps.", + "items": { + "type": "object", + "$ref": "#\/definitions\/app" + }, + "x-example": "" + } + }, + "required": [ + "total", + "apps" + ], + "example": { + "total": 5, + "apps": "" + } + }, + "appSecretList": { + "description": "App secrets list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of secrets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "secrets": { + "type": "array", + "description": "List of secrets.", + "items": { + "type": "object", + "$ref": "#\/definitions\/appSecret" + }, + "x-example": "" + } + }, + "required": [ + "total", + "secrets" + ], + "example": { + "total": 5, + "secrets": "" + } } }, "externalDocs": {