diff --git a/specs/latest/open-api3-latest-client.json b/specs/latest/open-api3-latest-client.json index b2c7c1f25..a364b5401 100644 --- a/specs/latest/open-api3-latest-client.json +++ b/specs/latest/open-api3-latest-client.json @@ -4004,6 +4004,848 @@ } } }, + "\/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": [], + "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": [], + "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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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": [], + "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": [], + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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": [], + "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": [], + "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": [], + "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": [], + "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", @@ -9672,16 +10514,347 @@ "in": "path" }, { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", + "tags": [ + "oauth2" + ], + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Approve", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Approve" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "approve", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/approve.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/authorize": { + "get": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", + "tags": [ + "oauth2" + ], + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Authorize", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Authorize" + } + } + } + } + }, + "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": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "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" + } + ] + } + }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", + "tags": [ + "oauth2" + ], + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Reject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Reject" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "reject", + "group": 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": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "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": "" + "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" + ] + } + } + } + } } }, "\/presences": { @@ -9870,7 +11043,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10003,7 +11177,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -15472,10 +16647,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 +16675,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": { @@ -17547,6 +18731,349 @@ "identifier": "token", "expired": false } + }, + "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "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" + } + }, + "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": { diff --git a/specs/latest/open-api3-latest-console.json b/specs/latest/open-api3-latest-console.json index 3de202c92..f6d07ae1c 100644 --- a/specs/latest/open-api3-latest-console.json +++ b/specs/latest/open-api3-latest-console.json @@ -5480,6 +5480,859 @@ ] } }, + "\/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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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", @@ -7432,6 +8285,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7714,6 +8568,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8045,6 +8900,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8322,6 +9178,12 @@ "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 +9205,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 +9223,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 +9269,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 +9358,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -8694,6 +9556,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.", @@ -8892,24 +9760,170 @@ }, "in": "path" } - ] + ] + } + }, + "\/compute\/databases\/{databaseId}\/backups": { + "get": { + "summary": "List database backups.", + "operationId": "computeListDatabaseBackups", + "tags": [ + "compute" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "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, + "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: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create a database backup.", + "operationId": "computeCreateDatabaseBackup", + "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", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/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, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + } + } + } + } + } + } } }, - "\/compute\/databases\/{databaseId}\/backups": { + "\/compute\/databases\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backups.", - "operationId": "computeListDatabaseBackups", + "summary": "List database backup policies.", + "operationId": "computeListDatabaseBackupPolicies", "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", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -8917,11 +9931,11 @@ }, "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}", @@ -8953,7 +9967,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, "schema": { "type": "array", @@ -8967,19 +9981,19 @@ ] }, "post": { - "summary": "Create a database backup.", - "operationId": "computeCreateDatabaseBackup", + "summary": "Create a database backup policy.", + "operationId": "computeCreateDatabaseBackupPolicy", "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", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -8987,11 +10001,11 @@ }, "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}", @@ -9028,13 +10042,46 @@ "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": "" + }, + "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" + ] } } } @@ -9552,209 +10599,209 @@ ] }, "post": { - "summary": "Create a database connection user.", - "operationId": "computeCreateDatabaseConnection", - "tags": [ - "compute" - ], - "description": "Create a new database connection user\/role. Returns the connection details including the generated credentials.", - "responses": { - "201": { - "description": "Connection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseConnection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Connection username.", - "x-example": "" - }, - "role": { - "type": "string", - "description": "Connection role for the new user. Common values: readonly (read-only access), readwrite (full read and write access).", - "default": "readwrite", - "x-example": "" - } - }, - "required": [ - "username" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/connections\/{connectionId}": { - "delete": { - "summary": "Delete a database connection.", - "operationId": "computeDeleteDatabaseConnection", - "tags": [ - "compute" - ], - "description": "Delete a database connection user\/role. The connection will be terminated immediately.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/delete-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "connectionId", - "description": "Connection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/credentials": { - "get": { - "summary": "Get database credentials.", - "operationId": "computeGetDatabaseCredentials", - "tags": [ - "compute" - ], - "description": "Get connection credentials for a dedicated database. Returns the hostname, port, username, password, database name, and full connection string.", - "responses": { - "200": { - "description": "Credentials", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseCredentials" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseCredentials", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-credentials.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" - } - ] - }, - "post": { + "summary": "Create a database connection user.", + "operationId": "computeCreateDatabaseConnection", + "tags": [ + "compute" + ], + "description": "Create a new database connection user\/role. Returns the connection details including the generated credentials.", + "responses": { + "201": { + "description": "Connection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseConnection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatabaseConnection", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/create-database-connection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "Connection username.", + "x-example": "" + }, + "role": { + "type": "string", + "description": "Connection role for the new user. Common values: readonly (read-only access), readwrite (full read and write access).", + "default": "readwrite", + "x-example": "" + } + }, + "required": [ + "username" + ] + } + } + } + } + } + }, + "\/compute\/databases\/{databaseId}\/connections\/{connectionId}": { + "delete": { + "summary": "Delete a database connection.", + "operationId": "computeDeleteDatabaseConnection", + "tags": [ + "compute" + ], + "description": "Delete a database connection user\/role. The connection will be terminated immediately.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDatabaseConnection", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/delete-database-connection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "connectionId", + "description": "Connection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/credentials": { + "get": { + "summary": "Get database credentials.", + "operationId": "computeGetDatabaseCredentials", + "tags": [ + "compute" + ], + "description": "Get connection credentials for a dedicated database. Returns the hostname, port, username, password, database name, and full connection string.", + "responses": { + "200": { + "description": "Credentials", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseCredentials" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDatabaseCredentials", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/get-database-credentials.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" + } + ] + }, + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "tags": [ @@ -10247,100 +11294,24 @@ }, "in": "path" } - ] - } - }, - "\/compute\/databases\/{databaseId}\/ha\/failovers": { - "post": { - "summary": "Trigger manual failover.", - "operationId": "computeCreateDatabaseFailover", - "tags": [ - "compute" - ], - "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.", - "responses": { - "202": { - "description": "DedicatedDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseFailover", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-failover.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": { - "targetReplicaId": { - "type": "string", - "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/compute\/databases\/{databaseId}\/insights": { - "get": { - "summary": "Get database performance insights.", - "operationId": "computeGetDatabaseInsights", + "\/compute\/databases\/{databaseId}\/ha\/failovers": { + "post": { + "summary": "Trigger manual failover.", + "operationId": "computeCreateDatabaseFailover", "tags": [ "compute" ], - "description": "Get query-level performance insights for a dedicated database. Returns top queries by execution time, wait events, and aggregate query statistics.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.", "responses": { - "200": { - "description": "PerformanceInsights", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePerformanceInsights" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -10348,15 +11319,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseInsights", + "method": "createDatabaseFailover", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-insights.md", + "demo": "compute\/create-database-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console" ], @@ -10381,47 +11352,42 @@ "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" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } } }, - "\/compute\/databases\/{databaseId}\/logs": { + "\/compute\/databases\/{databaseId}\/insights": { "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", + "summary": "Get database performance insights.", + "operationId": "computeGetDatabaseInsights", "tags": [ "compute" ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", + "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": "Dedicated database audit logs list", + "description": "PerformanceInsights", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseAuditLogList" + "$ref": "#\/components\/schemas\/dedicatedDatabasePerformanceInsights" } } } @@ -10429,11 +11395,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseLogs", + "method": "getDatabaseInsights", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-logs.md", + "demo": "compute\/get-database-insights.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10464,34 +11430,24 @@ "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.", + "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": "" + "x-example": "1h", + "default": "1h" }, "in": "query" }, { "name": "limit", - "description": "Maximum number of logs to return.", + "description": "Maximum number of queries to return.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": 1, - "default": 100 + "default": 25 }, "in": "query" } @@ -11583,76 +12539,6 @@ } } }, - "\/compute\/databases\/{databaseId}\/usage": { - "get": { - "summary": "Get database usage metrics.", - "operationId": "computeGetDatabaseUsage", - "tags": [ - "compute" - ], - "description": "Get usage metrics for a dedicated database including CPU, memory, storage, connections, and query statistics.", - "responses": { - "200": { - "description": "DedicatedDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/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, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "default": "30d" - }, - "in": "query" - } - ] - } - }, "\/console\/assistant": { "post": { "summary": "Create assistant query", @@ -12747,6 +13633,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "appsecrets", + "oauth2grants", "attributes", "indexes", "functions", @@ -12831,6 +13720,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "app_secrets", + "oauth2_grants", "attributes", "indexes", "functions", @@ -29424,7 +30316,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -29582,6 +30474,8 @@ "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", @@ -30498,6 +31392,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -34876,6 +35772,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", @@ -40636,7 +41640,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -40978,7 +41982,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -41346,7 +42350,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate" + "x-enum-name": "OnDuplicate" } }, "required": [ @@ -43573,7 +44577,7 @@ "baa", "backup_recovery" ], - "x-enum-name": "OrganizationAddon" + "x-enum-name": "Addon" }, "in": "path" } @@ -46399,7 +47403,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -46414,7 +47419,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -46422,7 +47426,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -46534,14 +47537,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 +47553,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -46557,8 +47560,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -46567,7 +47569,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 } ], @@ -47113,6 +48115,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -47290,6 +48294,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -47541,6 +48547,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -48104,6 +49112,124 @@ ] } }, + "\/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" + } + }, + "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 + } + }, + "required": [ + "enabled", + "authorizationUrl" + ] + } + } + } + } + } + }, "\/project\/oauth2\/amazon": { "patch": { "summary": "Update project OAuth2 Amazon", @@ -53773,7 +54899,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 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": { @@ -53804,6 +54930,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -53817,7 +54952,10 @@ "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 +54996,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-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", @@ -53872,7 +55010,10 @@ "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "x-enum-name": "ProjectPolicyId" }, @@ -56010,7 +57151,7 @@ "enum": [ "active" ], - "x-enum-name": "ProjectStatus" + "x-enum-name": "Status" } }, "required": [ @@ -56398,7 +57539,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -57210,7 +58351,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -57355,7 +58496,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -57365,7 +58506,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "installationId": { "type": "string", @@ -57622,7 +58763,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "default": [] }, @@ -57960,7 +59101,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -58105,7 +59246,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -58115,7 +59256,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "fallbackFile": { "type": "string", @@ -71233,7 +72374,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", @@ -74510,7 +75651,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74594,7 +75735,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74705,7 +75846,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -74775,7 +75916,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -74867,7 +76008,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -80922,6 +82063,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -80935,7 +82085,10 @@ "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" } } }, @@ -86830,10 +87983,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 +88011,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": { @@ -90592,6 +91754,61 @@ "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" + }, + "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": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, + "x-example": [ + "read", + "write" + ] + }, + "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 + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -90620,7 +91837,16 @@ "protocols", "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -90651,7 +91877,19 @@ "region": "fra", "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "projectAuthMethod": { @@ -99101,65 +100339,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 +100363,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 +100420,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -99245,6 +100436,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -100846,6 +102039,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 +102062,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -101054,7 +102252,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -101100,6 +102298,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -101152,10 +102351,11 @@ "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", "connectionPort": 5432, @@ -101192,7 +102392,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -103631,6 +104831,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", @@ -104396,260 +105668,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 +105768,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 +106329,235 @@ "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, "activityEventList": { "description": "Activity event list", "type": "object", @@ -105577,34 +106838,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 +107145,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": { diff --git a/specs/latest/open-api3-latest-server.json b/specs/latest/open-api3-latest-server.json index bf8af1f85..3d2e2ef4f 100644 --- a/specs/latest/open-api3-latest-server.json +++ b/specs/latest/open-api3-latest-server.json @@ -3840,6 +3840,870 @@ ] } }, + "\/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": [], + "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, + "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": [], + "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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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": [], + "Session": [] + } + }, + "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": [], + "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": { + "name": { + "type": "string", + "description": "Application name.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is application enabled?", + "default": true, + "x-example": false + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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": [ + { + "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": [], + "Session": [] + } + }, + "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": [], + "Session": [] + } + }, + "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": [], + "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", @@ -5802,6 +6666,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6088,6 +6953,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6423,6 +7289,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -17848,7 +18715,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -18006,6 +18873,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -18421,7 +19290,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime" + "x-enum-name": "Runtime" }, "execute": { "type": "array", @@ -18579,6 +19448,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -28186,76 +29057,410 @@ "in": "path" } ] - }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + }, + "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": [], + "JWT": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [], + "Session": [], + "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" + } + ] + } + }, + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "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. 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", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/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, - "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 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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/authorize": { + "get": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2Authorize", + "tags": [ + "oauth2" + ], + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Authorize", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Authorize" + } + } + } + } + }, + "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": { + "Project": [], + "Session": [] + } }, "security": [ { "Project": [], - "JWT": [], "Session": [], - "Key": [] + "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": "subscriberId", - "description": "Subscriber ID.", + "name": "client_id", + "description": "OAuth2 client ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" + "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" } ] } }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", + "tags": [ + "oauth2" + ], + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Reject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Reject" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "reject", + "group": 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": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "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": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } + } + }, "\/organization\/keys": { "get": { "summary": "List organization keys", @@ -29215,7 +30420,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29352,14 +30558,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 +30593,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 } ], @@ -29939,6 +31146,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30117,6 +31326,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30370,6 +31581,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes" @@ -30729,21 +31942,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 +32100,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 +32128,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 +32176,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 +32202,75 @@ "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" + } + }, + "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 + } + }, + "required": [ + "enabled", + "authorizationUrl" + ] + } + } } - ] + } } }, "\/project\/oauth2\/amazon": { @@ -36679,7 +38011,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 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": { @@ -36710,6 +38042,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -36723,7 +38064,10 @@ "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 +38109,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-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", @@ -36779,7 +38123,10 @@ "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "x-enum-name": "ProjectPolicyId" }, @@ -38383,7 +39730,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -39206,7 +40553,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -39351,7 +40698,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -39361,7 +40708,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "installationId": { "type": "string", @@ -39701,7 +41048,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework" + "x-enum-name": "Framework" }, "enabled": { "type": "boolean", @@ -39846,7 +41193,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "SiteBuildRuntime" + "x-enum-name": "BuildRuntime" }, "adapter": { "type": "string", @@ -39856,7 +41203,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter" + "x-enum-name": "Adapter" }, "fallbackFile": { "type": "string", @@ -52294,7 +53641,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", @@ -55552,7 +56899,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55637,7 +56984,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55749,7 +57096,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -55820,7 +57167,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -55913,7 +57260,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -60668,6 +62015,15 @@ }, { "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" } ], "discriminator": { @@ -60681,7 +62037,10 @@ "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" } } }, @@ -66153,10 +67512,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 +67540,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": { @@ -68972,6 +70340,61 @@ "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" + }, + "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": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, + "x-example": [ + "read", + "write" + ] + }, + "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 + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -69000,7 +70423,16 @@ "protocols", "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -69031,7 +70463,19 @@ "region": "fra", "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "projectAuthMethod": { @@ -74139,6 +75583,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 +75848,318 @@ "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "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" } }, "activityEventList": { @@ -74512,6 +76329,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": { diff --git a/specs/latest/swagger2-latest-client.json b/specs/latest/swagger2-latest-client.json index f08217b1e..8c1d0396b 100644 --- a/specs/latest/swagger2-latest-client.json +++ b/specs/latest/swagger2-latest-client.json @@ -4222,6 +4222,831 @@ ] } }, + "\/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": [], + "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": [], + "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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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": [], + "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": [], + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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" + } + ] + } + }, + "\/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": [], + "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": [], + "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": [], + "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", @@ -10184,16 +11009,321 @@ "description": "Topic ID. The topic ID subscribed to.", "required": true, "type": "string", - "x-example": "", + "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": [ + "application\/json" + ], + "tags": [ + "oauth2" + ], + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Approve", + "schema": { + "$ref": "#\/definitions\/oauth2Approve" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "approve", + "group": null, + "cookies": false, + "type": "", + "demo": "oauth2\/approve.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "oauth2.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "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" + ] + } + } + ] + } + }, + "\/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": { + "Project": [] + } + }, + "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": "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" + } + ] + } + }, + "\/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": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "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": "subscriberId", - "description": "Subscriber ID.", - "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" + ] + } } ] } @@ -10377,7 +11507,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -10508,7 +11639,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -15756,10 +16888,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 +16916,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": { @@ -17837,6 +18978,352 @@ "identifier": "token", "expired": false } + }, + "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "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" + } + }, + "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-console.json b/specs/latest/swagger2-latest-console.json index d907050f4..cabc00f6b 100644 --- a/specs/latest/swagger2-latest-console.json +++ b/specs/latest/swagger2-latest-console.json @@ -5729,6 +5729,842 @@ ] } }, + "\/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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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", @@ -8100,6 +8936,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8109,6 +8946,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8393,6 +9231,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8402,6 +9241,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -8734,6 +9574,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -8743,6 +9584,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -9017,6 +9859,12 @@ "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 +9886,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 +9904,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 +9950,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 +10039,7 @@ "metricsEnabled": { "type": "boolean", "description": "Enable metrics collection.", - "default": true, + "default": false, "x-example": false }, "poolerEnabled": { @@ -9385,6 +10233,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 +10443,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 +10595,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 +10640,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 +10653,8 @@ ] }, "post": { - "summary": "Create a database backup.", - "operationId": "computeCreateDatabaseBackup", + "summary": "Create a database backup policy.", + "operationId": "computeCreateDatabaseBackupPolicy", "consumes": [ "application\/json" ], @@ -9669,22 +10664,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 +10713,46 @@ "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": "" + }, + "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" + ] } } ] @@ -10229,207 +11257,207 @@ ] }, "post": { - "summary": "Create a database connection user.", - "operationId": "computeCreateDatabaseConnection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Create a new database connection user\/role. Returns the connection details including the generated credentials.", - "responses": { - "201": { - "description": "Connection", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseConnection" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Connection username.", - "x-example": "" - }, - "role": { - "type": "string", - "description": "Connection role for the new user. Common values: readonly (read-only access), readwrite (full read and write access).", - "default": "readwrite", - "x-example": "" - } - }, - "required": [ - "username" - ] - } - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/connections\/{connectionId}": { - "delete": { - "summary": "Delete a database connection.", - "operationId": "computeDeleteDatabaseConnection", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Delete a database connection user\/role. The connection will be terminated immediately.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/delete-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "connectionId", - "description": "Connection ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/credentials": { - "get": { - "summary": "Get database credentials.", - "operationId": "computeGetDatabaseCredentials", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Get connection credentials for a dedicated database. Returns the hostname, port, username, password, database name, and full connection string.", - "responses": { - "200": { - "description": "Credentials", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseCredentials" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseCredentials", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-credentials.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" - } - ] - }, - "post": { + "summary": "Create a database connection user.", + "operationId": "computeCreateDatabaseConnection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "Create a new database connection user\/role. Returns the connection details including the generated credentials.", + "responses": { + "201": { + "description": "Connection", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseConnection" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatabaseConnection", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/create-database-connection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "Connection username.", + "x-example": "" + }, + "role": { + "type": "string", + "description": "Connection role for the new user. Common values: readonly (read-only access), readwrite (full read and write access).", + "default": "readwrite", + "x-example": "" + } + }, + "required": [ + "username" + ] + } + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/connections\/{connectionId}": { + "delete": { + "summary": "Delete a database connection.", + "operationId": "computeDeleteDatabaseConnection", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "Delete a database connection user\/role. The connection will be terminated immediately.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDatabaseConnection", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/delete-database-connection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "connectionId", + "description": "Connection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/compute\/databases\/{databaseId}\/credentials": { + "get": { + "summary": "Get database credentials.", + "operationId": "computeGetDatabaseCredentials", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "compute" + ], + "description": "Get connection credentials for a dedicated database. Returns the hostname, port, username, password, database name, and full connection string.", + "responses": { + "200": { + "description": "Credentials", + "schema": { + "$ref": "#\/definitions\/dedicatedDatabaseCredentials" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDatabaseCredentials", + "group": "databases", + "cookies": false, + "type": "", + "demo": "compute\/get-database-credentials.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" + } + ] + }, + "patch": { "summary": "Update database credentials.", "operationId": "computeUpdateDatabaseCredentials", "consumes": [ @@ -10914,111 +11942,39 @@ ] } }, - "\/compute\/databases\/{databaseId}\/ha\/failovers": { - "post": { - "summary": "Trigger manual failover.", - "operationId": "computeCreateDatabaseFailover", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "compute" - ], - "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.", - "responses": { - "202": { - "description": "DedicatedDatabase", - "schema": { - "$ref": "#\/definitions\/dedicatedDatabase" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseFailover", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-failover.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": { - "targetReplicaId": { - "type": "string", - "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", - "x-example": "", - "x-nullable": true - } - } - } - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/insights": { - "get": { - "summary": "Get database performance insights.", - "operationId": "computeGetDatabaseInsights", - "consumes": [], + "\/compute\/databases\/{databaseId}\/ha\/failovers": { + "post": { + "summary": "Trigger manual failover.", + "operationId": "computeCreateDatabaseFailover", + "consumes": [ + "application\/json" + ], "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.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.", "responses": { - "200": { - "description": "PerformanceInsights", + "202": { + "description": "DedicatedDatabase", "schema": { - "$ref": "#\/definitions\/dedicatedDatabasePerformanceInsights" + "$ref": "#\/definitions\/dedicatedDatabase" } } }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseInsights", + "method": "createDatabaseFailover", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-insights.md", + "demo": "compute\/create-database-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console" ], @@ -11043,30 +11999,27 @@ "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" + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "", + "x-nullable": true + } + } + } } ] } }, - "\/compute\/databases\/{databaseId}\/logs": { + "\/compute\/databases\/{databaseId}\/insights": { "get": { - "summary": "List database audit logs.", - "operationId": "computeListDatabaseLogs", + "summary": "Get database performance insights.", + "operationId": "computeGetDatabaseInsights", "consumes": [], "produces": [ "application\/json" @@ -11074,22 +12027,22 @@ "tags": [ "compute" ], - "description": "List audit logs for a dedicated database. Returns DDL operations and security-relevant events.", + "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": "Dedicated database audit logs list", + "description": "PerformanceInsights", "schema": { - "$ref": "#\/definitions\/dedicatedDatabaseAuditLogList" + "$ref": "#\/definitions\/dedicatedDatabasePerformanceInsights" } } }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseLogs", + "method": "getDatabaseInsights", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-logs.md", + "demo": "compute\/get-database-insights.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11118,29 +12071,21 @@ "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.", + "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": "", + "x-example": "1h", + "default": "1h", "in": "query" }, { "name": "limit", - "description": "Maximum number of logs to return.", + "description": "Maximum number of queries to return.", "required": false, "type": "integer", "format": "int32", - "x-example": 1, - "default": 100, + "default": 25, "in": "query" } ] @@ -12187,72 +13132,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 +14206,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "appsecrets", + "oauth2grants", "attributes", "indexes", "functions", @@ -13411,6 +14293,9 @@ "threats", "feedbacks", "sh_installations", + "apps", + "app_secrets", + "oauth2_grants", "attributes", "indexes", "functions", @@ -29554,7 +30439,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -29808,6 +30693,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -29905,6 +30792,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -30235,7 +31124,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 +31640,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -31005,6 +31894,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -31102,6 +31993,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -35466,6 +36359,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", @@ -41222,7 +42253,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -41595,7 +42626,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -41995,7 +43026,7 @@ "skip", "overwrite" ], - "x-enum-name": "MigrationOnDuplicate", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ "fail", "skip", @@ -44280,7 +45311,7 @@ "baa", "backup_recovery" ], - "x-enum-name": "OrganizationAddon", + "x-enum-name": "Addon", "x-enum-keys": [ "baa", "backup_recovery" @@ -47017,7 +48048,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -47032,7 +48064,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "permissions", "expiresAt", @@ -47040,7 +48071,6 @@ ], "required": [ "presenceId", - "userId", "status" ], "responses": [ @@ -47150,14 +48180,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 +48196,6 @@ }, "parameters": [ "presenceId", - "userId", "status", "expiresAt", "metadata", @@ -47173,8 +48203,7 @@ "purge" ], "required": [ - "presenceId", - "userId" + "presenceId" ], "responses": [ { @@ -47183,7 +48212,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 } ], @@ -47736,6 +48765,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -47833,6 +48864,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -48011,6 +49044,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -48108,6 +49143,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -48354,6 +49391,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -48451,6 +49490,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -49010,6 +50051,126 @@ ] } }, + "\/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" + } + }, + "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 + } + }, + "required": [ + "enabled", + "authorizationUrl" + ] + } + } + ] + } + }, "\/project\/oauth2\/amazon": { "patch": { "summary": "Update project OAuth2 Amazon", @@ -54833,7 +55994,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 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": [ { @@ -54862,6 +56023,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -54875,7 +56045,10 @@ "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,7 +56087,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-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", @@ -54927,7 +56100,10 @@ "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": [ @@ -54939,7 +56115,10 @@ "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "in": "path" } @@ -57366,7 +58545,7 @@ "enum": [ "active" ], - "x-enum-name": "ProjectStatus", + "x-enum-name": "Status", "x-enum-keys": [ "active" ] @@ -57758,7 +58937,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -58557,7 +59736,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -58719,7 +59898,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 +60004,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -59085,7 +60264,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -59438,7 +60617,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -59600,7 +60779,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 +60885,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -72344,7 +73523,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", @@ -75602,7 +76781,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75683,7 +76862,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75795,7 +76974,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -75863,7 +77042,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -75953,7 +77132,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -81865,6 +83044,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -81878,7 +83066,10 @@ "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" } } }, @@ -87812,10 +89003,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 +89031,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": { @@ -91594,6 +92794,61 @@ "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" + }, + "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": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, + "x-example": [ + "read", + "write" + ] + }, + "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 + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -91622,7 +92877,16 @@ "protocols", "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -91653,7 +92917,19 @@ "region": "fra", "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "projectAuthMethod": { @@ -100235,65 +101511,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 +101535,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 +101592,8 @@ "$createdAt", "databaseId", "projectId", + "policyId", + "trigger", "type", "status", "sizeBytes", @@ -100379,6 +101608,8 @@ "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", "type": "full", "status": "completed", "sizeBytes": 1073741824, @@ -101992,6 +103223,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 +103246,7 @@ "specification": { "type": "string", "description": "Specification identifier.", - "x-example": "starter" + "x-example": "s-2vcpu-2gb" }, "backend": { "type": "string", @@ -102200,7 +103436,7 @@ "metricsEnabled": { "type": "boolean", "description": "Whether metrics collection is enabled.", - "x-example": true + "x-example": false }, "sqlApiEnabled": { "type": "boolean", @@ -102246,6 +103482,7 @@ "projectId", "name", "type", + "api", "region", "engine", "version", @@ -102298,10 +103535,11 @@ "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", "connectionPort": 5432, @@ -102338,7 +103576,7 @@ "storageAutoscalingMaxGb": 500, "maintenanceWindowDay": "sun", "maintenanceWindowHourUtc": 3, - "metricsEnabled": true, + "metricsEnabled": false, "sqlApiEnabled": true, "sqlApiAllowedStatements": "SELECT", "sqlApiMaxRows": 10000, @@ -104792,6 +106030,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", @@ -105572,271 +106882,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 +106982,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 +107561,236 @@ "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, "activityEventList": { "description": "Activity event list", "type": "object", @@ -106792,35 +108081,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 +108399,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..4c88f3609 100644 --- a/specs/latest/swagger2-latest-server.json +++ b/specs/latest/swagger2-latest-server.json @@ -4025,6 +4025,853 @@ ] } }, + "\/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": "" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + }, + "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 + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user or members of the configured team. Defaults to false (any user in the project can authorize).", + "default": false, + "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" + } + }, + "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", @@ -6406,6 +7253,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6415,6 +7263,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -6703,6 +7552,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -6712,6 +7562,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -7048,6 +7899,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ], @@ -7057,6 +7909,7 @@ "tablesdb", "documentsdb", "vectorsdb", + "dedicatedDatabases", "functions", "storage" ] @@ -18023,7 +18876,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -18277,6 +19130,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -18374,6 +19229,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -18784,7 +19641,7 @@ "flutter-3.41", "flutter-3.44" ], - "x-enum-name": "FunctionRuntime", + "x-enum-name": "Runtime", "x-enum-keys": [ "node-14.5", "node-16.0", @@ -19038,6 +19895,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -19135,6 +19994,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -28676,71 +29537,379 @@ "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. 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, - "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 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" + ] + } + } + ] + } + }, + "\/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": { + "Project": [], + "Session": [] + } }, "security": [ { "Project": [], - "JWT": [], "Session": [], - "Key": [] + "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, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "client_id", + "description": "OAuth2 client ID.", "required": true, "type": "string", - "x-example": "", + "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" + } + ] + } + }, + "\/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": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "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" + ] + } } ] } @@ -29719,7 +30888,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "presences.write", "platforms": [ - "client" + "client", + "console" ], "packaging": false, "public": true, @@ -29854,14 +31024,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 +31059,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 } ], @@ -30448,6 +31619,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -30545,6 +31718,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -30724,6 +31899,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -30821,6 +31998,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -31069,6 +32248,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -31166,6 +32347,8 @@ "domains.read", "domains.write", "events.read", + "apps.read", + "apps.write", "usage.read" ] } @@ -31524,39 +32707,173 @@ "in": "path" } ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", - "consumes": [ - "application\/json" - ], + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "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", + "schema": { + "$ref": "#\/definitions\/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, + "type": "string", + "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" + ] + } + } + ] + }, + "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" + } + ] + } + }, + "\/project\/oauth2": { + "get": { + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", + "consumes": [], "produces": [ "application\/json" ], "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", "schema": { - "$ref": "#\/definitions\/mockNumber" + "$ref": "#\/definitions\/oAuth2ProviderList" } } }, "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" @@ -31576,121 +32893,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": "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": "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" } ] - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", + } + }, + "\/project\/oauth2-server": { + "put": { + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", "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" - } - ] - } - }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", - "consumes": [], "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 +32968,71 @@ ], "parameters": [ { - "name": "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" + } + }, + "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 + } + }, + "required": [ + "enabled", + "authorizationUrl" + ] + } } ] } @@ -37625,7 +38929,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 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": [ { @@ -37654,6 +38958,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -37667,7 +38980,10 @@ "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,7 +39023,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-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", @@ -37720,7 +39036,10 @@ "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": [ @@ -37732,7 +39051,10 @@ "session-invalidation", "session-limit", "user-limit", - "membership-privacy" + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email" ], "in": "path" } @@ -39645,7 +40967,7 @@ "307", "308" ], - "x-enum-name": "RedirectStatusCode", + "x-enum-name": "StatusCode", "x-enum-keys": [ "MovedPermanently", "Found", @@ -40455,7 +41777,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -40617,7 +41939,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 +42045,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -41063,7 +42385,7 @@ "vite", "other" ], - "x-enum-name": "SiteFramework", + "x-enum-name": "Framework", "x-enum-keys": [ "analog", "angular", @@ -41225,7 +42547,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 +42653,7 @@ "static", "ssr" ], - "x-enum-name": "SiteAdapter", + "x-enum-name": "Adapter", "x-enum-keys": [ "static", "ssr" @@ -53328,7 +54650,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", @@ -56564,7 +57886,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56646,7 +57968,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56759,7 +58081,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.read", + "scope": "users.read", "platforms": [ "server", "console" @@ -56828,7 +58150,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -56919,7 +58241,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "targets.write", + "scope": "users.write", "platforms": [ "server", "console" @@ -61563,6 +62885,15 @@ }, { "$ref": "#\/definitions\/policyMembershipPrivacy" + }, + { + "$ref": "#\/definitions\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/definitions\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/definitions\/policyDenyFreeEmail" } ], "x-discriminator": { @@ -61576,7 +62907,10 @@ "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" } } }, @@ -67068,10 +68402,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 +68430,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": { @@ -69901,6 +71244,61 @@ "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" + }, + "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": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, + "x-example": [ + "read", + "write" + ] + }, + "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 + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "required": [ @@ -69929,7 +71327,16 @@ "protocols", "region", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "oAuth2ServerEnabled", + "oAuth2ServerAuthorizationUrl", + "oAuth2ServerScopes", + "oAuth2ServerAccessTokenDuration", + "oAuth2ServerRefreshTokenDuration", + "oAuth2ServerPublicAccessTokenDuration", + "oAuth2ServerPublicRefreshTokenDuration", + "oAuth2ServerConfidentialPkce", + "oAuth2ServerDiscoveryUrl" ], "example": { "$id": "5e5ea5c16897e", @@ -69960,7 +71367,19 @@ "region": "fra", "billingLimits": "", "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, "projectAuthMethod": { @@ -75074,6 +76493,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 +76758,319 @@ "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" + ] + }, + "internal": { + "type": "boolean", + "description": "When true, the application is restricted to the owner user (if `userId` is set) or members of `teamId` (if set). When false, any user in the project can authorize against the app.", + "x-example": false + }, + "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" + }, + "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", + "internal", + "enabled", + "type", + "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" + ], + "internal": false, + "enabled": true, + "type": "confidential", + "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": "Masked application client secret. Only the last 6 characters are returned.", + "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", + "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": "*****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" + }, + "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", + "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", + "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" } }, "activityEventList": { @@ -75453,6 +77246,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": {