diff --git a/specs/latest/open-api3-latest.json b/specs/latest/open-api3-latest.json index 7c7d31883..3238339fa 100644 --- a/specs/latest/open-api3-latest.json +++ b/specs/latest/open-api3-latest.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "2.4.0", + "version": "2.5.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4813,7 +4813,8 @@ "scope": "sessions.write", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, @@ -4893,7 +4894,8 @@ "scope": "sessions.write", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, @@ -5260,7 +5262,8 @@ "scope": "sessions.write", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, @@ -7784,7 +7787,8 @@ "scope": "account", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, @@ -7855,7 +7859,8 @@ "scope": "public", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, @@ -9506,7 +9511,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, domain, enabled, public", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, domain, enabled", "required": false, "schema": { "type": "array", @@ -9613,17 +9618,11 @@ "example": "" }, "enabled": { - "description": "Whether tracking is enabled.", + "description": "Whether the property accepts events. Events sent to a disabled property are rejected as not found.", "type": "boolean", "default": true, "example": false }, - "public": { - "description": "Whether stats are publicly viewable.", - "type": "boolean", - "default": false, - "example": false - }, "allowedOrigins": { "description": "Allowed origins for tracking. Use [\"*\"] to allow all.", "type": "array", @@ -9788,13 +9787,7 @@ "nullable": true }, "enabled": { - "description": "Whether tracking is enabled.", - "type": "boolean", - "example": false, - "nullable": true - }, - "public": { - "description": "Whether stats are publicly viewable.", + "description": "Whether the property accepts events. Events sent to a disabled property are rejected as not found.", "type": "boolean", "example": false, "nullable": true @@ -14744,7 +14737,9 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "avatars.write", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, @@ -14809,7 +14804,9 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "avatars.write", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, @@ -23089,9 +23086,9 @@ "x-appwrite": { "group": "transactions", "demo": "databases\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ "console", @@ -23735,7 +23732,7 @@ } }, "indexes": { - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", "type": "array", "default": [], "items": { @@ -30939,7 +30936,7 @@ "tags": [ "databases" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, `unique`, `spatial`, and `trigram`. `trigram` is only available on PostgreSQL and lets `contains`, `startsWith`, and `endsWith` queries on string attributes use an index.", "responses": { "202": { "description": "Index", @@ -31052,6 +31049,13 @@ "spatial" ], "title": "spatial" + }, + { + "type": "string", + "enum": [ + "trigram" + ], + "title": "trigram" } ] }, @@ -31925,9 +31929,9 @@ "x-appwrite": { "group": "transactions", "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documentsdb.documents.write", "platforms": [ "server", @@ -51292,7 +51296,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -51388,7 +51393,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -78008,6 +78014,359 @@ } } }, + "\/project\/environments": { + "get": { + "summary": "List project environments", + "operationId": "projectListEnvironments", + "tags": [ + "project" + ], + "description": "Get a list of all environments of the project. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Projects List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/projectList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "environments", + "demo": "project\/list-environments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search, accessedAt, status, parentId", + "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", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create project environment", + "operationId": "projectCreateEnvironment", + "tags": [ + "project" + ], + "description": "Create a new environment of the project. An environment is a separate project in the same organization and region, with its own resources and users. Its usage is billed under the project it belongs to.", + "responses": { + "201": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "environments", + "demo": "project\/create-environment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "environmentId": { + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "example": "" + }, + "name": { + "description": "Environment name. Max length: 128 chars.", + "type": "string", + "example": "" + } + }, + "required": [ + "environmentId", + "name" + ] + } + } + } + } + } + }, + "\/project\/environments\/{environmentId}": { + "get": { + "summary": "Get project environment", + "operationId": "projectGetEnvironment", + "tags": [ + "project" + ], + "description": "Get an environment of the project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "environments", + "demo": "project\/get-environment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "environmentId", + "description": "Environment unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update project environment", + "operationId": "projectUpdateEnvironment", + "tags": [ + "project" + ], + "description": "Update the name of an environment of the project.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "environments", + "demo": "project\/update-environment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "environmentId", + "description": "Environment unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Environment name. Max length: 128 chars.", + "type": "string", + "example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete project environment", + "operationId": "projectDeleteEnvironment", + "tags": [ + "project" + ], + "description": "Delete an environment of the project, with all of its resources and users.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "environments", + "demo": "project\/delete-environment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "environmentId", + "description": "Environment unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "" + }, + "in": "path" + } + ] + } + }, "\/project\/keys": { "get": { "summary": "List project keys", @@ -83780,7 +84139,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "project.oauth2.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -85314,7 +85674,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "project.oauth2.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -85637,7 +85998,8 @@ "rate-key": "url:{url},ip:{ip}", "scope": "project.oauth2.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -86949,6 +87311,14 @@ "description": "Android application ID. Max length: 256 chars.", "type": "string", "example": "" + }, + "fingerprints": { + "description": "SHA-256 fingerprints of the certificates your app is signed with, such as \"14:6D:E9:...:2B:6A\". Passkeys created in the app are accepted when its signature matches one. Find them under App signing in Play Console, or with `.\/gradlew signingReport`.", + "type": "array", + "default": [], + "items": { + "type": "string" + } } }, "required": [ @@ -87039,6 +87409,14 @@ "description": "Android application ID. Max length: 256 chars.", "type": "string", "example": "" + }, + "fingerprints": { + "description": "SHA-256 fingerprints of the certificates your app is signed with, such as \"14:6D:E9:...:2B:6A\". Passkeys created in the app are accepted when its signature matches one. Find them under App signing in Play Console, or with `.\/gradlew signingReport`. Omit to keep the current list, or pass an empty array to clear it.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true } }, "required": [ @@ -88773,7 +89151,8 @@ "project.policies.write" ], "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -88821,6 +89200,83 @@ } } }, + "\/project\/policies\/password-rotation": { + "patch": { + "summary": "Update password rotation policy", + "operationId": "projectUpdatePasswordRotationPolicy", + "tags": [ + "project" + ], + "description": "Require a password reset when an email\/password sign-in uses a password older than the configured maximum age. Options left out keep their current value.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "policies", + "demo": "project\/update-password-rotation-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "project.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "description": "Enable password rotation. Disabled by default.", + "type": "boolean", + "example": false + }, + "maxAge": { + "description": "Maximum password age in seconds. Minimum allowed value is 86400 seconds (1 day), and maximum is 10 years, which is 315360000 seconds. Defaults to 1 year, which is 31536000 seconds.", + "type": "integer", + "example": 86400, + "format": "int32" + } + } + } + } + } + } + } + }, "\/project\/policies\/password-strength": { "patch": { "summary": "Update password strength policy", @@ -102553,9 +103009,9 @@ "x-appwrite": { "group": "files", "demo": "storage\/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "files.write", "platforms": [ "console", @@ -103939,9 +104395,9 @@ "x-appwrite": { "group": "transactions", "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ "documents.write", "rows.write" @@ -105142,7 +105598,7 @@ } }, "indexes": { - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", "type": "array", "default": [], "items": { @@ -110814,7 +111270,7 @@ "tags": [ "tablesDB" ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, `unique`, `spatial`, or `trigram`. `trigram` is only available on PostgreSQL and lets `contains`, `startsWith`, and `endsWith` queries on string columns use an index.", "responses": { "202": { "description": "Index", @@ -110927,6 +111383,13 @@ "spatial" ], "title": "spatial" + }, + { + "type": "string", + "enum": [ + "trigram" + ], + "title": "trigram" } ] }, @@ -113758,6 +114221,12 @@ "type": "string", "default": "", "example": "" + }, + "membershipId": { + "description": "Membership ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "type": "string", + "default": "", + "example": "" } }, "required": [ @@ -114046,9 +114515,9 @@ "x-appwrite": { "group": "memberships", "demo": "teams\/update-membership-status.md", - "rate-limit": 0, + "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-key": "ip:{ip},url:{url}", "scope": "public", "platforms": [ "console", @@ -122333,9 +122802,9 @@ "x-appwrite": { "group": "transactions", "demo": "vectorsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "vectorsdb.documents.write", "platforms": [ "console", @@ -141900,6 +142369,12 @@ "default": false, "nullable": true }, + "parentId": { + "type": "string", + "description": "ID of the project this environment belongs to. Null when the project is not an environment.", + "example": "5e5ea5c16897e", + "nullable": true + }, "billingLimits": { "type": "object", "description": "Billing limits reached", @@ -142128,6 +142603,7 @@ "blocks": "", "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", "wafEnabled": true, + "parentId": "5e5ea5c16897e", "billingLimits": "", "firstAccessedAt": "2020-10-15T06:38:00.000+00:00", "mcpAccessedAt": "2020-10-15T06:38:00.000+00:00", @@ -142378,6 +142854,13 @@ "advisor" ], "title": "advisor" + }, + { + "type": "string", + "enum": [ + "oauth2" + ], + "title": "oauth2" } ] }, @@ -148067,6 +148550,12 @@ "example": true, "default": true }, + "supportForTrigramIndex": { + "type": "boolean", + "description": "Whether the database adapter supports trigram indexes.", + "example": false, + "default": false + }, "supportForAttributeResizing": { "type": "boolean", "description": "Whether the database adapter supports resizing attributes.", @@ -148124,6 +148613,7 @@ "supportForSpatialIndexNull", "supportForFulltextWildcard", "supportForMultipleFulltextIndexes", + "supportForTrigramIndex", "supportForAttributeResizing", "supportForSchemas", "maxIndexLength", @@ -148161,6 +148651,7 @@ "supportForSpatialIndexNull": false, "supportForFulltextWildcard": true, "supportForMultipleFulltextIndexes": true, + "supportForTrigramIndex": false, "supportForAttributeResizing": true, "supportForSchemas": true, "maxIndexLength": 768, @@ -151170,12 +151661,6 @@ "example": true, "default": true }, - "public": { - "type": "boolean", - "description": "Whether stats for this property are publicly viewable.", - "example": false, - "default": false - }, "allowedOrigins": { "type": "array", "description": "List of origins allowed to send tracking events. Use [\"*\"] to allow all.", @@ -151209,7 +151694,6 @@ "name", "domain", "enabled", - "public", "allowedOrigins", "accessedAt", "firstAccessedAt" @@ -151221,7 +151705,6 @@ "name": "My Website", "domain": "example.com", "enabled": true, - "public": false, "allowedOrigins": [ "https:\/\/example.com" ], @@ -152099,6 +152582,13 @@ "example": 2, "default": 0 }, + "environments": { + "type": "integer", + "description": "Maximum environments per project. 0 when the plan does not offer environments.", + "format": "int32", + "example": 5, + "default": 0 + }, "projects": { "type": "integer", "description": "Projects", @@ -152590,6 +153080,7 @@ "screenshotsGenerated", "webhooks", "wafRules", + "environments", "projects", "platforms", "users", @@ -152656,6 +153147,7 @@ "members": 25, "webhooks": 25, "wafRules": 2, + "environments": 5, "projects": 2, "platforms": 3, "users": 25,