diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3403973b0d..b3345059b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,7 +146,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Grids, + Databases/TablesDB, Functions, FunctionsSchedule, GraphQL, diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 9f9bba75da..dce0e39e92 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -56,7 +56,7 @@ return [ 'type' => Database::VAR_STRING, 'size' => 128, 'required' => false, - 'default' => 'grids', + 'default' => 'tablesdb', 'signed' => true, 'array' => false, 'filters' => [], diff --git a/app/config/services.php b/app/config/services.php index 696184d0c5..f02f169b88 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -66,15 +66,15 @@ return [ 'optional' => true, 'icon' => '/images/services/databases.png', ], - 'tables' => [ - 'key' => 'tables', - 'name' => 'Tables', - 'subtitle' => 'The Tables service allows you to create structured tables of rows, query and filter lists of rows', - 'description' => '/docs/services/tables.md', + 'tablesdb' => [ + 'key' => 'tablesdb', + 'name' => 'TablesDB', + 'subtitle' => 'The TablesDB service allows you to create structured tables of columns, query and filter lists of rows', + 'description' => '/docs/services/tablesdb.md', 'controller' => '', // Uses modules 'sdk' => true, 'docs' => true, - 'docsUrl' => 'https://appwrite.io/docs/client/tables', + 'docsUrl' => 'https://appwrite.io/docs/client/tablesdb', 'tests' => false, 'optional' => true, 'icon' => '/images/services/databases.png', diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 69cdf83180..6933394dc9 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4362,7 +4362,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4379,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -4451,7 +4451,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4468,12 +4468,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4497,9 +4498,10 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } } ], @@ -4599,7 +4601,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4616,7 +4618,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -4681,7 +4683,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4698,7 +4700,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4715,12 +4717,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4743,10 +4746,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -4844,7 +4848,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4861,7 +4865,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -4947,7 +4951,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -4964,7 +4968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -5011,643 +5015,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/functions\/{functionId}\/executions": { "get": { "summary": "List executions", @@ -5672,7 +5039,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5747,7 +5114,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5862,7 +5229,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -5936,7 +5303,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -5988,7 +5355,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6456,7 +5823,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6539,7 +5906,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7393,6 +6760,647 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8440,8 +8448,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8505,7 +8513,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -8537,7 +8546,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -8561,7 +8576,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8585,7 +8604,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8609,7 +8632,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8633,7 +8660,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8657,7 +8688,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8681,7 +8716,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8705,7 +8744,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8729,7 +8772,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8753,7 +8800,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8777,7 +8828,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8801,7 +8856,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8825,7 +8884,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8849,7 +8912,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8873,7 +8940,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8897,7 +8968,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8954,7 +9029,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -8969,17 +9055,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -9011,7 +9100,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9145,7 +9250,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9306,7 +9434,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9320,7 +9474,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9334,7 +9491,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9348,7 +9508,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9362,7 +9525,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9404,7 +9570,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9436,7 +9609,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9471,12 +9650,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9663,7 +9853,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9731,7 +9954,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9775,7 +10010,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9789,7 +10032,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9839,7 +10085,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9859,7 +10114,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9941,7 +10200,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -9992,7 +10266,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10083,7 +10368,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10214,7 +10516,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10234,7 +10565,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10254,7 +10589,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10280,7 +10619,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10332,7 +10676,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10358,7 +10711,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10378,7 +10736,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10410,7 +10772,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10430,7 +10798,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10450,7 +10824,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10482,7 +10860,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10556,7 +10940,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10618,7 +11022,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 4ee19cd594..0fb2dbf419 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4360,7 +4360,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4420,7 +4420,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4495,7 +4495,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4543,7 +4543,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4558,12 +4558,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4579,29 +4580,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4664,7 +4647,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4679,19 +4662,21 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4704,33 +4689,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4763,6 +4726,17 @@ "type": "boolean", "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4799,7 +4773,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4814,12 +4788,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4834,28 +4809,11 @@ } ], "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -4880,7 +4838,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -4917,7 +4875,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4932,12 +4890,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4954,30 +4913,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5026,7 +4966,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5041,12 +4981,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5066,33 +5007,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5158,7 +5077,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5173,12 +5092,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5194,29 +5114,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5267,7 +5169,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5282,7 +5184,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [] @@ -5354,7 +5256,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5369,7 +5271,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [] @@ -5462,7 +5364,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5477,7 +5379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [] @@ -5535,7 +5437,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5550,7 +5452,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [] @@ -5638,7 +5540,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5653,7 +5555,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [] @@ -5713,7 +5615,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5728,7 +5630,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [] @@ -5801,7 +5703,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5816,7 +5718,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [] @@ -5911,7 +5813,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5926,7 +5828,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [] @@ -6026,7 +5928,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6041,7 +5943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [] @@ -6136,7 +6038,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6151,7 +6053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6153,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6266,7 +6168,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [] @@ -6361,7 +6263,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6376,7 +6278,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [] @@ -6476,7 +6378,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6491,7 +6393,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [] @@ -6595,7 +6497,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6610,7 +6512,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [] @@ -6719,7 +6621,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6734,7 +6636,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [] @@ -6839,7 +6741,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6854,7 +6756,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [] @@ -6964,7 +6866,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6979,7 +6881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [] @@ -7084,7 +6986,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7099,7 +7001,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [] @@ -7209,7 +7111,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7224,7 +7126,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [] @@ -7319,7 +7221,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7334,7 +7236,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [] @@ -7434,7 +7336,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7449,7 +7351,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [] @@ -7569,7 +7471,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7584,7 +7486,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [] @@ -7690,7 +7592,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7705,7 +7607,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [] @@ -7810,7 +7712,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7825,7 +7727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [] @@ -7920,7 +7822,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7935,7 +7837,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [] @@ -8066,7 +7968,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8081,7 +7983,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [] @@ -8141,7 +8043,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8156,7 +8058,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [] @@ -8225,7 +8127,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8240,7 +8142,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8337,7 +8239,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8354,7 +8256,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -8426,7 +8328,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8443,12 +8345,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8472,14 +8375,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8499,10 +8404,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8583,7 +8489,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8600,7 +8506,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8616,12 +8522,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8641,10 +8548,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8709,7 +8617,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8726,7 +8634,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8742,7 +8650,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [] @@ -8807,7 +8715,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8824,7 +8732,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8840,7 +8748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [] @@ -8919,7 +8827,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8936,7 +8844,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -9001,7 +8909,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -9018,7 +8926,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9035,12 +8943,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9063,10 +8972,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -9164,7 +9074,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9181,7 +9091,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -9267,7 +9177,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9284,7 +9194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -9355,7 +9265,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9370,7 +9280,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDb.listRowLogs" }, "auth": { "Project": [] @@ -9452,7 +9362,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9468,7 +9378,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [] @@ -9568,7 +9478,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9584,7 +9494,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [] @@ -9684,7 +9594,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9699,7 +9609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [] @@ -9770,7 +9680,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9785,7 +9695,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [] @@ -9902,7 +9812,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9917,7 +9827,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [] @@ -9977,7 +9887,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9992,7 +9902,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [] @@ -10061,7 +9971,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10076,7 +9986,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDb.listTableLogs" }, "auth": { "Project": [] @@ -10148,7 +10058,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10163,7 +10073,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDb.getTableUsage" }, "auth": { "Project": [] @@ -10197,7 +10107,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10220,4779 +10130,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "tags": [ - "grids" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "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", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -15017,7 +10154,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -15032,12 +10169,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15055,31 +10193,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/logList" - } - ], - "description": "" } ], "auth": { @@ -15121,7 +10239,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -15140,12 +10258,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -15157,12 +10275,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15180,31 +10299,11 @@ } ], "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -15239,7 +10338,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15276,7 +10375,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15349,7 +10448,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15582,7 +10681,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15631,7 +10730,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15681,7 +10780,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15781,7 +10880,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15841,7 +10940,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15876,7 +10975,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15913,7 +11012,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15972,7 +11071,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16202,7 +11301,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16263,7 +11362,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16343,7 +11442,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16426,7 +11525,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16522,7 +11621,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16607,7 +11706,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16710,7 +11809,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16807,7 +11906,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16869,7 +11968,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16933,7 +12032,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -17023,7 +12122,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17094,7 +12193,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17169,7 +12268,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17284,7 +12383,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17349,7 +12448,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17420,7 +12519,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17465,7 +12564,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17502,7 +12601,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17561,7 +12660,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17652,7 +12751,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17721,7 +12820,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17812,7 +12911,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17883,7 +12982,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17935,7 +13034,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -19698,7 +14797,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19774,7 +14873,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19918,7 +15017,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20064,7 +15163,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20238,7 +15337,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20416,7 +15515,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20525,7 +15624,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20637,7 +15736,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20690,7 +15789,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20752,7 +15851,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20827,7 +15926,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20902,7 +16001,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20978,7 +16077,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -21083,7 +16182,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21191,7 +16290,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21276,7 +16375,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21364,7 +16463,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21479,7 +16578,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21597,7 +16696,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -21692,7 +16791,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -21790,7 +16889,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21895,7 +16994,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22003,7 +17102,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22146,7 +17245,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22291,7 +17390,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22386,7 +17485,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22484,7 +17583,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22579,7 +17678,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22677,7 +17776,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22772,7 +17871,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22870,7 +17969,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -22965,7 +18064,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23063,7 +18162,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23116,7 +18215,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23178,7 +18277,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23253,7 +18352,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23328,7 +18427,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23402,7 +18501,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23485,7 +18584,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23545,7 +18644,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23622,7 +18721,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23684,7 +18783,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23759,7 +18858,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23843,7 +18942,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -23933,7 +19032,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -23996,7 +19095,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24071,7 +19170,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24145,7 +19244,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24233,7 +19332,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24326,7 +19425,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24368,6 +19467,11 @@ "type": "string", "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false } }, "required": [ @@ -24405,7 +19509,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24481,7 +19585,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24553,7 +19657,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24664,7 +19768,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24797,7 +19901,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -24902,7 +20006,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25026,7 +20130,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25084,7 +20188,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25135,7 +20239,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -27120,7 +22224,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27188,7 +22292,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27273,7 +22377,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27341,7 +22445,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27427,7 +22531,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -28563,7 +23667,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -30993,7 +26097,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", "demo": "proxy\/create-a-p-i-rule.md", @@ -31060,7 +26164,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31138,7 +26242,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31251,7 +26355,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31500,7 +26604,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31570,7 +26674,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31819,7 +26923,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31868,7 +26972,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -31918,7 +27022,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32018,7 +27122,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32078,7 +27182,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32113,7 +27217,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32150,7 +27254,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32209,7 +27313,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32454,7 +27558,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32515,7 +27619,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32595,7 +27699,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32678,7 +27782,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32779,7 +27883,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32859,7 +27963,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -32962,7 +28066,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33060,7 +28164,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33122,7 +28226,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33186,7 +28290,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33276,7 +28380,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33347,7 +28451,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33418,7 +28522,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33480,7 +28584,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33551,7 +28655,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33596,7 +28700,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33633,7 +28737,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33692,7 +28796,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33783,7 +28887,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33852,7 +28956,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -33943,7 +29047,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35296,7 +30400,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35378,7 +30482,5348 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbListUsage", + "tags": [ + "tablesDb" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tables-db\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDbListTableLogs", + "tags": [ + "tablesDb" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tables-db\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDbListRowLogs", + "tags": [ + "tablesDb" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tables-db\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDbGetTableUsage", + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbGetUsage", + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tables-db\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/get-usage.md" + } + ], + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36517,7 +36962,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36597,7 +37042,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36686,7 +37131,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36746,7 +37191,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36816,7 +37261,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37866,7 +38311,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -40916,8 +41361,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -40981,7 +41426,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -41013,7 +41459,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -41037,7 +41489,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41061,7 +41517,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41085,7 +41545,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41109,7 +41573,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41133,7 +41601,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41157,7 +41629,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41181,7 +41657,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41205,7 +41685,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41229,7 +41713,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41253,7 +41741,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41277,7 +41769,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41301,7 +41797,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41325,7 +41825,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41349,7 +41853,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41373,7 +41881,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41397,7 +41909,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41421,7 +41937,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41445,7 +41965,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41469,7 +41993,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41493,7 +42021,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41517,7 +42049,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41541,7 +42077,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41565,7 +42105,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41589,7 +42133,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41613,7 +42161,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41637,7 +42189,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41661,7 +42217,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41685,7 +42245,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41709,7 +42273,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41733,7 +42301,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41757,7 +42329,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41781,7 +42357,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41805,7 +42385,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41829,7 +42413,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41853,7 +42441,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41877,7 +42469,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41901,7 +42497,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41925,7 +42525,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41949,7 +42553,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -41973,7 +42581,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -41997,7 +42609,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42021,7 +42637,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42045,7 +42665,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42069,7 +42693,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42093,7 +42721,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42117,7 +42749,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42141,7 +42777,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42165,7 +42805,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42189,7 +42833,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42219,6 +42867,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42226,8 +42879,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42337,7 +42999,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42392,7 +43068,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42467,7 +43147,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42544,7 +43237,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42621,7 +43327,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42683,7 +43402,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42751,7 +43481,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42828,7 +43570,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42896,7 +43651,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -42964,7 +43731,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43032,7 +43811,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43124,7 +43915,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43234,7 +44041,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43289,7 +44110,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43364,7 +44189,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43441,7 +44279,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43518,7 +44369,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43580,7 +44444,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43648,7 +44523,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43725,7 +44612,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43793,7 +44693,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43861,7 +44773,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43929,7 +44853,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44021,7 +44957,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44099,7 +45051,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44177,7 +45141,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44234,7 +45210,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44249,17 +45236,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44291,7 +45281,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44425,7 +45431,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44586,7 +45615,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44600,7 +45655,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44614,7 +45672,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44628,7 +45689,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44642,7 +45706,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44684,7 +45751,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44716,7 +45790,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44751,12 +45831,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -44943,7 +46034,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45011,7 +46135,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45055,7 +46191,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45069,7 +46213,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45119,7 +46266,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45139,7 +46295,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45221,7 +46381,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45313,7 +46488,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45363,7 +46557,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45414,7 +46617,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45505,7 +46719,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45691,7 +46922,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45786,7 +47048,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45848,7 +47125,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46037,7 +47325,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46166,7 +47484,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46198,7 +47535,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46248,7 +47591,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46292,7 +47644,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46342,7 +47702,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46398,7 +47767,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46454,7 +47833,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46486,7 +47875,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46512,7 +47907,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46539,7 +47939,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46553,7 +47958,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46612,7 +48020,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46667,7 +48085,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46705,7 +48141,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46879,7 +48322,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -47010,7 +48482,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47304,9 +48805,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47408,7 +48909,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47418,7 +48919,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47511,7 +49080,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47579,7 +49166,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47638,7 +49236,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47658,7 +49266,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47696,7 +49308,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47764,7 +49383,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47820,7 +49451,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47840,7 +49481,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47860,7 +49505,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47886,7 +49535,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -47938,7 +49592,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -47964,7 +49627,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -47984,7 +49652,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -47999,7 +49671,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48026,7 +49701,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48070,7 +49750,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48099,7 +49787,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48120,7 +49813,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48154,7 +49851,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48296,7 +49999,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48422,7 +50144,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48452,7 +50191,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48482,7 +50226,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48528,7 +50277,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48590,7 +50346,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48652,7 +50417,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48858,7 +50632,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49055,7 +50856,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49309,7 +51136,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49554,7 +51414,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49814,7 +51706,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -49834,7 +51760,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -49868,7 +51798,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -49967,7 +51903,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -49993,7 +51946,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50043,7 +52001,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50064,6 +52031,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50121,6 +52093,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50131,7 +52104,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50163,7 +52152,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50183,7 +52178,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50203,7 +52204,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50235,7 +52240,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50301,7 +52312,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50411,7 +52437,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50473,7 +52525,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50547,7 +52609,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50609,7 +52691,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50697,7 +52790,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50767,7 +52876,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 639817ac35..41c2e126a8 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4061,7 +4061,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4076,12 +4076,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4098,30 +4099,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4185,7 +4167,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4200,12 +4182,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4213,7 +4196,8 @@ "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4226,34 +4210,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4287,6 +4248,17 @@ "type": "boolean", "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4323,7 +4295,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4338,12 +4310,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4361,31 +4334,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4435,7 +4388,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4450,12 +4403,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4476,34 +4430,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4570,7 +4501,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4585,12 +4516,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4607,30 +4539,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4682,7 +4595,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4697,7 +4610,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [], @@ -4770,7 +4683,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4785,7 +4698,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [], @@ -4879,7 +4792,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -4894,7 +4807,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [], @@ -4953,7 +4866,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -4968,7 +4881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [], @@ -5057,7 +4970,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5072,7 +4985,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [], @@ -5133,7 +5046,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5148,7 +5061,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [], @@ -5222,7 +5135,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5237,7 +5150,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [], @@ -5333,7 +5246,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5348,7 +5261,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5362,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5464,7 +5377,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [], @@ -5560,7 +5473,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5575,7 +5488,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5676,7 +5589,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5691,7 +5604,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [], @@ -5787,7 +5700,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5802,7 +5715,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [], @@ -5903,7 +5816,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -5918,7 +5831,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [], @@ -6023,7 +5936,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6038,7 +5951,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [], @@ -6148,7 +6061,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6163,7 +6076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [], @@ -6269,7 +6182,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6284,7 +6197,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [], @@ -6395,7 +6308,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6410,7 +6323,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [], @@ -6516,7 +6429,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6531,7 +6444,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [], @@ -6642,7 +6555,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6657,7 +6570,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [], @@ -6753,7 +6666,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6768,7 +6681,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [], @@ -6869,7 +6782,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -6884,7 +6797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [], @@ -7005,7 +6918,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7020,7 +6933,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [], @@ -7127,7 +7040,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7142,7 +7055,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [], @@ -7248,7 +7161,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7263,7 +7176,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [], @@ -7359,7 +7272,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7374,7 +7287,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [], @@ -7506,7 +7419,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7521,7 +7434,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [], @@ -7582,7 +7495,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7597,7 +7510,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [], @@ -7667,7 +7580,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7682,7 +7595,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7780,7 +7693,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7797,7 +7710,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [], @@ -7871,7 +7784,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7888,12 +7801,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -7918,14 +7832,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -7946,10 +7862,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8032,7 +7949,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8049,7 +7966,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8065,12 +7982,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8091,10 +8009,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8160,7 +8079,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8177,7 +8096,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8193,7 +8112,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [], @@ -8259,7 +8178,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8276,7 +8195,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8292,7 +8211,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [], @@ -8372,7 +8291,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8389,7 +8308,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [], @@ -8456,7 +8375,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8473,7 +8392,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8490,12 +8409,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8519,10 +8439,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -8622,7 +8543,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8639,7 +8560,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [], @@ -8727,7 +8648,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8744,7 +8665,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [], @@ -8817,7 +8738,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8833,7 +8754,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [], @@ -8934,7 +8855,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -8950,7 +8871,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [], @@ -9051,7 +8972,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9066,7 +8987,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [], @@ -9138,7 +9059,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9153,7 +9074,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [], @@ -9271,7 +9192,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9286,7 +9207,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [], @@ -9347,7 +9268,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9362,7 +9283,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [], @@ -9408,4564 +9329,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, "\/functions": { "get": { "summary": "List functions", @@ -13990,7 +9353,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14064,7 +9427,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14298,7 +9661,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14348,7 +9711,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14399,7 +9762,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14459,7 +9822,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14690,7 +10053,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14752,7 +10115,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14833,7 +10196,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14917,7 +10280,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -15014,7 +10377,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15100,7 +10463,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15204,7 +10567,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15302,7 +10665,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15365,7 +10728,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15430,7 +10793,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15521,7 +10884,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15593,7 +10956,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15670,7 +11033,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15787,7 +11150,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15854,7 +11217,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15926,7 +11289,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15986,7 +11349,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16078,7 +11441,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16148,7 +11511,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16240,7 +11603,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16312,7 +11675,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16366,7 +11729,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18169,7 +13532,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18246,7 +13609,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18391,7 +13754,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18538,7 +13901,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18713,7 +14076,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18892,7 +14255,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -19002,7 +14365,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19115,7 +14478,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19169,7 +14532,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19232,7 +14595,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19308,7 +14671,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19384,7 +14747,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19461,7 +14824,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19567,7 +14930,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19676,7 +15039,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19762,7 +15125,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19851,7 +15214,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19967,7 +15330,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20086,7 +15449,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -20182,7 +15545,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -20281,7 +15644,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20387,7 +15750,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20496,7 +15859,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20640,7 +16003,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20786,7 +16149,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -20882,7 +16245,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20981,7 +16344,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21077,7 +16440,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21176,7 +16539,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21272,7 +16635,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21371,7 +16734,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21467,7 +16830,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21566,7 +16929,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21620,7 +16983,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21683,7 +17046,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21759,7 +17122,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21835,7 +17198,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21910,7 +17273,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21994,7 +17357,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22055,7 +17418,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22133,7 +17496,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22196,7 +17559,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22272,7 +17635,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22357,7 +17720,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22449,7 +17812,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22513,7 +17876,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22590,7 +17953,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22661,7 +18024,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -22911,7 +18274,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -22961,7 +18324,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23012,7 +18375,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23072,7 +18435,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23318,7 +18681,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23380,7 +18743,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23461,7 +18824,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23545,7 +18908,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23647,7 +19010,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23728,7 +19091,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -23832,7 +19195,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -23931,7 +19294,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -23994,7 +19357,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24059,7 +19422,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24150,7 +19513,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24222,7 +19585,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24294,7 +19657,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24357,7 +19720,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24429,7 +19792,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24489,7 +19852,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24581,7 +19944,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24651,7 +20014,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24743,7 +20106,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26059,6 +21422,4936 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27138,7 +27431,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27219,7 +27512,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27309,7 +27602,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27370,7 +27663,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27441,7 +27734,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30747,8 +31040,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30812,7 +31105,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -30844,7 +31138,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -30868,7 +31168,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30892,7 +31196,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -30916,7 +31224,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -30940,7 +31252,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -30964,7 +31280,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -30988,7 +31308,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31012,7 +31336,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31036,7 +31364,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31060,7 +31392,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31084,7 +31420,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31108,7 +31448,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31132,7 +31476,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31156,7 +31504,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31180,7 +31532,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31204,7 +31560,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31228,7 +31588,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31252,7 +31616,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31276,7 +31644,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31300,7 +31672,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31324,7 +31700,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31348,7 +31728,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31372,7 +31756,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31396,7 +31784,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31420,7 +31812,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31444,7 +31840,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31468,7 +31868,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31492,7 +31896,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31516,7 +31924,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31540,7 +31952,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31564,7 +31980,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31588,7 +32008,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31612,7 +32036,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31636,7 +32064,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31660,7 +32092,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31684,7 +32120,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31714,6 +32154,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31721,8 +32166,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31832,7 +32286,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -31887,7 +32355,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -31962,7 +32434,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32039,7 +32524,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32116,7 +32614,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32178,7 +32689,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32246,7 +32768,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32323,7 +32857,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32391,7 +32938,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32459,7 +33018,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32527,7 +33098,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32619,7 +33202,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32729,7 +33328,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32784,7 +33397,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -32859,7 +33476,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -32936,7 +33566,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33013,7 +33656,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33075,7 +33731,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33143,7 +33810,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33220,7 +33899,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33288,7 +33980,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33356,7 +34060,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33424,7 +34140,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33516,7 +34244,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33594,7 +34338,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33672,7 +34428,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33729,7 +34497,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33744,17 +34523,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33786,7 +34568,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -33920,7 +34718,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34081,7 +34902,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34095,7 +34942,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34109,7 +34959,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34123,7 +34976,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34137,7 +34993,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34179,7 +35038,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34211,7 +35077,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34246,12 +35118,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34438,7 +35321,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34506,7 +35422,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34550,7 +35478,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34564,7 +35500,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34614,7 +35553,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34634,7 +35582,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34716,7 +35668,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34808,7 +35775,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -34858,7 +35844,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -34909,7 +35904,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35000,7 +36006,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35186,7 +36209,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35375,7 +36429,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35434,7 +36518,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35489,7 +36583,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35527,7 +36639,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35701,7 +36820,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35832,7 +36980,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -35888,7 +37065,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -35908,7 +37095,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -35928,7 +37119,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -35954,7 +37149,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36006,7 +37206,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36032,7 +37241,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36052,7 +37266,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36067,7 +37285,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36094,7 +37315,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36138,7 +37364,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36167,7 +37401,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36187,7 +37426,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36221,7 +37464,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36253,7 +37502,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36273,7 +37528,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36293,7 +37554,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36325,7 +37590,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36391,7 +37662,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36501,7 +37787,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36563,7 +37875,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36637,7 +37959,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36699,7 +38041,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index ceb6d6ecfd..6933394dc9 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4362,7 +4362,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4379,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -4451,7 +4451,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4468,12 +4468,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4497,9 +4498,10 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } } ], @@ -4599,7 +4601,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4616,7 +4618,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -4681,7 +4683,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4698,7 +4700,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4715,12 +4717,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4743,10 +4746,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -4844,7 +4848,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4861,7 +4865,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -4947,7 +4951,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -4964,7 +4968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -5011,643 +5015,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/functions\/{functionId}\/executions": { "get": { "summary": "List executions", @@ -5672,7 +5039,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5747,7 +5114,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5862,7 +5229,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -5936,7 +5303,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -5988,7 +5355,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6456,7 +5823,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6539,7 +5906,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7393,6 +6760,647 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8440,8 +8448,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8505,7 +8513,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -8537,7 +8546,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -8561,7 +8576,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8585,7 +8604,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8609,7 +8632,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8633,7 +8660,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8657,7 +8688,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8681,7 +8716,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8705,7 +8744,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8729,7 +8772,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8753,7 +8800,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8777,7 +8828,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8801,7 +8856,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8825,7 +8884,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8849,7 +8912,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8873,7 +8940,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8897,7 +8968,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8954,7 +9029,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -9014,7 +9100,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9148,7 +9250,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9309,7 +9434,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9323,7 +9474,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9337,7 +9491,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9351,7 +9508,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9365,7 +9525,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9407,7 +9570,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9439,7 +9609,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9474,12 +9650,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9666,7 +9853,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9734,7 +9954,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9778,7 +10010,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9792,7 +10032,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9842,7 +10085,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9862,7 +10114,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9944,7 +10200,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -9995,7 +10266,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10086,7 +10368,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10217,7 +10516,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10237,7 +10565,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10257,7 +10589,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10283,7 +10619,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10335,7 +10676,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10361,7 +10711,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10381,7 +10736,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10413,7 +10772,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10433,7 +10798,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10453,7 +10824,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10485,7 +10860,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10559,7 +10940,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10621,7 +11022,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4ee19cd594..0fb2dbf419 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4360,7 +4360,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4420,7 +4420,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4495,7 +4495,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4543,7 +4543,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4558,12 +4558,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4579,29 +4580,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4664,7 +4647,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4679,19 +4662,21 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4704,33 +4689,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4763,6 +4726,17 @@ "type": "boolean", "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4799,7 +4773,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4814,12 +4788,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4834,28 +4809,11 @@ } ], "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -4880,7 +4838,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -4917,7 +4875,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4932,12 +4890,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4954,30 +4913,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5026,7 +4966,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5041,12 +4981,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5066,33 +5007,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5158,7 +5077,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5173,12 +5092,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5194,29 +5114,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5267,7 +5169,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5282,7 +5184,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [] @@ -5354,7 +5256,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5369,7 +5271,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [] @@ -5462,7 +5364,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5477,7 +5379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [] @@ -5535,7 +5437,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5550,7 +5452,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [] @@ -5638,7 +5540,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5653,7 +5555,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [] @@ -5713,7 +5615,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5728,7 +5630,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [] @@ -5801,7 +5703,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5816,7 +5718,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [] @@ -5911,7 +5813,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5926,7 +5828,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [] @@ -6026,7 +5928,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6041,7 +5943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [] @@ -6136,7 +6038,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6151,7 +6053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6153,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6266,7 +6168,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [] @@ -6361,7 +6263,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6376,7 +6278,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [] @@ -6476,7 +6378,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6491,7 +6393,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [] @@ -6595,7 +6497,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6610,7 +6512,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [] @@ -6719,7 +6621,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6734,7 +6636,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [] @@ -6839,7 +6741,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6854,7 +6756,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [] @@ -6964,7 +6866,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6979,7 +6881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [] @@ -7084,7 +6986,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7099,7 +7001,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [] @@ -7209,7 +7111,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7224,7 +7126,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [] @@ -7319,7 +7221,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7334,7 +7236,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [] @@ -7434,7 +7336,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7449,7 +7351,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [] @@ -7569,7 +7471,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7584,7 +7486,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [] @@ -7690,7 +7592,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7705,7 +7607,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [] @@ -7810,7 +7712,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7825,7 +7727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [] @@ -7920,7 +7822,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7935,7 +7837,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [] @@ -8066,7 +7968,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8081,7 +7983,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [] @@ -8141,7 +8043,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8156,7 +8058,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [] @@ -8225,7 +8127,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8240,7 +8142,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8337,7 +8239,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8354,7 +8256,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -8426,7 +8328,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8443,12 +8345,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8472,14 +8375,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8499,10 +8404,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8583,7 +8489,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8600,7 +8506,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8616,12 +8522,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8641,10 +8548,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8709,7 +8617,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8726,7 +8634,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8742,7 +8650,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [] @@ -8807,7 +8715,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8824,7 +8732,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8840,7 +8748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [] @@ -8919,7 +8827,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8936,7 +8844,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -9001,7 +8909,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -9018,7 +8926,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9035,12 +8943,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9063,10 +8972,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -9164,7 +9074,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9181,7 +9091,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -9267,7 +9177,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9284,7 +9194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -9355,7 +9265,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9370,7 +9280,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDb.listRowLogs" }, "auth": { "Project": [] @@ -9452,7 +9362,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9468,7 +9378,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [] @@ -9568,7 +9478,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9584,7 +9494,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [] @@ -9684,7 +9594,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9699,7 +9609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [] @@ -9770,7 +9680,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9785,7 +9695,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [] @@ -9902,7 +9812,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9917,7 +9827,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [] @@ -9977,7 +9887,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9992,7 +9902,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [] @@ -10061,7 +9971,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10076,7 +9986,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDb.listTableLogs" }, "auth": { "Project": [] @@ -10148,7 +10058,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10163,7 +10073,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDb.getTableUsage" }, "auth": { "Project": [] @@ -10197,7 +10107,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10220,4779 +10130,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "tags": [ - "grids" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "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", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -15017,7 +10154,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -15032,12 +10169,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15055,31 +10193,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/logList" - } - ], - "description": "" } ], "auth": { @@ -15121,7 +10239,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -15140,12 +10258,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -15157,12 +10275,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15180,31 +10299,11 @@ } ], "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -15239,7 +10338,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15276,7 +10375,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15349,7 +10448,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15582,7 +10681,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15631,7 +10730,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15681,7 +10780,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15781,7 +10880,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15841,7 +10940,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15876,7 +10975,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15913,7 +11012,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15972,7 +11071,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16202,7 +11301,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16263,7 +11362,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16343,7 +11442,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16426,7 +11525,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16522,7 +11621,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16607,7 +11706,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16710,7 +11809,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16807,7 +11906,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16869,7 +11968,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16933,7 +12032,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -17023,7 +12122,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17094,7 +12193,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17169,7 +12268,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17284,7 +12383,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17349,7 +12448,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17420,7 +12519,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17465,7 +12564,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17502,7 +12601,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17561,7 +12660,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17652,7 +12751,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17721,7 +12820,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17812,7 +12911,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17883,7 +12982,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17935,7 +13034,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -19698,7 +14797,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19774,7 +14873,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19918,7 +15017,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20064,7 +15163,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20238,7 +15337,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20416,7 +15515,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20525,7 +15624,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20637,7 +15736,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20690,7 +15789,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20752,7 +15851,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20827,7 +15926,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20902,7 +16001,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20978,7 +16077,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -21083,7 +16182,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21191,7 +16290,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21276,7 +16375,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21364,7 +16463,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21479,7 +16578,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21597,7 +16696,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -21692,7 +16791,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -21790,7 +16889,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21895,7 +16994,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22003,7 +17102,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22146,7 +17245,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22291,7 +17390,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22386,7 +17485,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22484,7 +17583,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22579,7 +17678,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22677,7 +17776,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22772,7 +17871,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22870,7 +17969,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -22965,7 +18064,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23063,7 +18162,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23116,7 +18215,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23178,7 +18277,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23253,7 +18352,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23328,7 +18427,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23402,7 +18501,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23485,7 +18584,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23545,7 +18644,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23622,7 +18721,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23684,7 +18783,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23759,7 +18858,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23843,7 +18942,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -23933,7 +19032,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -23996,7 +19095,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24071,7 +19170,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24145,7 +19244,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24233,7 +19332,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24326,7 +19425,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24368,6 +19467,11 @@ "type": "string", "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "x-example": false } }, "required": [ @@ -24405,7 +19509,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24481,7 +19585,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24553,7 +19657,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24664,7 +19768,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24797,7 +19901,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -24902,7 +20006,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25026,7 +20130,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25084,7 +20188,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25135,7 +20239,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -27120,7 +22224,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27188,7 +22292,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27273,7 +22377,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27341,7 +22445,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27427,7 +22531,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -28563,7 +23667,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -30993,7 +26097,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", "demo": "proxy\/create-a-p-i-rule.md", @@ -31060,7 +26164,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31138,7 +26242,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31251,7 +26355,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31500,7 +26604,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31570,7 +26674,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31819,7 +26923,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31868,7 +26972,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -31918,7 +27022,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32018,7 +27122,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32078,7 +27182,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32113,7 +27217,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32150,7 +27254,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32209,7 +27313,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32454,7 +27558,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32515,7 +27619,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32595,7 +27699,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32678,7 +27782,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32779,7 +27883,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32859,7 +27963,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -32962,7 +28066,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33060,7 +28164,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33122,7 +28226,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33186,7 +28290,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33276,7 +28380,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33347,7 +28451,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33418,7 +28522,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33480,7 +28584,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33551,7 +28655,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33596,7 +28700,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33633,7 +28737,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33692,7 +28796,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33783,7 +28887,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33852,7 +28956,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -33943,7 +29047,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35296,7 +30400,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35378,7 +30482,5348 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbListUsage", + "tags": [ + "tablesDb" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabases" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tables-db\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDbListTableLogs", + "tags": [ + "tablesDb" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tables-db\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDbListRowLogs", + "tags": [ + "tablesDb" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tables-db\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDbGetTableUsage", + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbGetUsage", + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tables-db\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/get-usage.md" + } + ], + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36517,7 +36962,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36597,7 +37042,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36686,7 +37131,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36746,7 +37191,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36816,7 +37261,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37866,7 +38311,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -40916,8 +41361,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -40981,7 +41426,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -41013,7 +41459,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -41037,7 +41489,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41061,7 +41517,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41085,7 +41545,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41109,7 +41573,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41133,7 +41601,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41157,7 +41629,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41181,7 +41657,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41205,7 +41685,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41229,7 +41713,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41253,7 +41741,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41277,7 +41769,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41301,7 +41797,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41325,7 +41825,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41349,7 +41853,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41373,7 +41881,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41397,7 +41909,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41421,7 +41937,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41445,7 +41965,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41469,7 +41993,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41493,7 +42021,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41517,7 +42049,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41541,7 +42077,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41565,7 +42105,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41589,7 +42133,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41613,7 +42161,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41637,7 +42189,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41661,7 +42217,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41685,7 +42245,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41709,7 +42273,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41733,7 +42301,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41757,7 +42329,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41781,7 +42357,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41805,7 +42385,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41829,7 +42413,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41853,7 +42441,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41877,7 +42469,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41901,7 +42497,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41925,7 +42525,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41949,7 +42553,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -41973,7 +42581,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -41997,7 +42609,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42021,7 +42637,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42045,7 +42665,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42069,7 +42693,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42093,7 +42721,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42117,7 +42749,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42141,7 +42777,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42165,7 +42805,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42189,7 +42833,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42219,6 +42867,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42226,8 +42879,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42337,7 +42999,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42392,7 +43068,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42467,7 +43147,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42544,7 +43237,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42621,7 +43327,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42683,7 +43402,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42751,7 +43481,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42828,7 +43570,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42896,7 +43651,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -42964,7 +43731,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43032,7 +43811,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43124,7 +43915,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43234,7 +44041,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43289,7 +44110,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43364,7 +44189,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43441,7 +44279,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43518,7 +44369,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43580,7 +44444,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43648,7 +44523,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43725,7 +44612,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43793,7 +44693,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43861,7 +44773,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43929,7 +44853,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44021,7 +44957,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44099,7 +45051,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44177,7 +45141,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44234,7 +45210,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44249,17 +45236,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44291,7 +45281,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44425,7 +45431,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44586,7 +45615,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44600,7 +45655,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44614,7 +45672,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44628,7 +45689,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44642,7 +45706,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44684,7 +45751,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44716,7 +45790,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44751,12 +45831,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -44943,7 +46034,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45011,7 +46135,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45055,7 +46191,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45069,7 +46213,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45119,7 +46266,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45139,7 +46295,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45221,7 +46381,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45313,7 +46488,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45363,7 +46557,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45414,7 +46617,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45505,7 +46719,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45691,7 +46922,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45786,7 +47048,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45848,7 +47125,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46037,7 +47325,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46166,7 +47484,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46198,7 +47535,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46248,7 +47591,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46292,7 +47644,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46342,7 +47702,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46398,7 +47767,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46454,7 +47833,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46486,7 +47875,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46512,7 +47907,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46539,7 +47939,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46553,7 +47958,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46612,7 +48020,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46667,7 +48085,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46705,7 +48141,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46879,7 +48322,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -47010,7 +48482,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47304,9 +48805,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47408,7 +48909,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47418,7 +48919,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47511,7 +49080,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47579,7 +49166,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47638,7 +49236,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47658,7 +49266,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47696,7 +49308,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47764,7 +49383,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47820,7 +49451,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47840,7 +49481,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47860,7 +49505,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47886,7 +49535,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -47938,7 +49592,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -47964,7 +49627,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -47984,7 +49652,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -47999,7 +49671,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48026,7 +49701,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48070,7 +49750,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48099,7 +49787,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48120,7 +49813,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48154,7 +49851,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48296,7 +49999,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48422,7 +50144,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48452,7 +50191,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48482,7 +50226,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48528,7 +50277,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48590,7 +50346,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48652,7 +50417,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48858,7 +50632,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49055,7 +50856,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49309,7 +51136,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49554,7 +51414,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49814,7 +51706,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -49834,7 +51760,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -49868,7 +51798,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -49967,7 +51903,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -49993,7 +51946,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50043,7 +52001,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50064,6 +52031,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50121,6 +52093,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50131,7 +52104,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50163,7 +52152,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50183,7 +52178,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50203,7 +52204,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50235,7 +52240,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50301,7 +52312,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50411,7 +52437,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50473,7 +52525,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50547,7 +52609,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50609,7 +52691,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50697,7 +52790,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50767,7 +52876,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "securitySchemes": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index d0f11523ab..41c2e126a8 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4061,7 +4061,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4076,12 +4076,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4098,30 +4099,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4185,7 +4167,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4200,12 +4182,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4213,7 +4196,8 @@ "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4226,34 +4210,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4287,6 +4248,17 @@ "type": "boolean", "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4323,7 +4295,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4338,12 +4310,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4361,31 +4334,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4435,7 +4388,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4450,12 +4403,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4476,34 +4430,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4570,7 +4501,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4585,12 +4516,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4607,30 +4539,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4682,7 +4595,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4697,7 +4610,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [], @@ -4770,7 +4683,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4785,7 +4698,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [], @@ -4879,7 +4792,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -4894,7 +4807,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [], @@ -4953,7 +4866,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -4968,7 +4881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [], @@ -5057,7 +4970,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5072,7 +4985,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [], @@ -5133,7 +5046,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5148,7 +5061,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [], @@ -5222,7 +5135,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5237,7 +5150,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [], @@ -5333,7 +5246,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5348,7 +5261,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5362,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5464,7 +5377,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [], @@ -5560,7 +5473,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5575,7 +5488,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5676,7 +5589,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5691,7 +5604,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [], @@ -5787,7 +5700,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5802,7 +5715,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [], @@ -5903,7 +5816,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -5918,7 +5831,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [], @@ -6023,7 +5936,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6038,7 +5951,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [], @@ -6148,7 +6061,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6163,7 +6076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [], @@ -6269,7 +6182,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6284,7 +6197,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [], @@ -6395,7 +6308,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6410,7 +6323,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [], @@ -6516,7 +6429,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6531,7 +6444,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [], @@ -6642,7 +6555,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6657,7 +6570,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [], @@ -6753,7 +6666,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6768,7 +6681,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [], @@ -6869,7 +6782,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -6884,7 +6797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [], @@ -7005,7 +6918,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7020,7 +6933,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [], @@ -7127,7 +7040,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7142,7 +7055,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [], @@ -7248,7 +7161,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7263,7 +7176,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [], @@ -7359,7 +7272,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7374,7 +7287,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [], @@ -7506,7 +7419,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7521,7 +7434,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [], @@ -7582,7 +7495,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7597,7 +7510,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [], @@ -7667,7 +7580,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7682,7 +7595,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7780,7 +7693,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7797,7 +7710,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [], @@ -7871,7 +7784,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7888,12 +7801,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -7918,14 +7832,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -7946,10 +7862,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8032,7 +7949,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8049,7 +7966,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8065,12 +7982,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8091,10 +8009,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8160,7 +8079,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8177,7 +8096,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8193,7 +8112,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [], @@ -8259,7 +8178,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8276,7 +8195,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8292,7 +8211,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [], @@ -8372,7 +8291,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8389,7 +8308,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [], @@ -8456,7 +8375,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8473,7 +8392,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8490,12 +8409,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8519,10 +8439,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -8622,7 +8543,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8639,7 +8560,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [], @@ -8727,7 +8648,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8744,7 +8665,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [], @@ -8817,7 +8738,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8833,7 +8754,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [], @@ -8934,7 +8855,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -8950,7 +8871,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [], @@ -9051,7 +8972,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9066,7 +8987,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [], @@ -9138,7 +9059,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9153,7 +9074,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [], @@ -9271,7 +9192,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9286,7 +9207,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [], @@ -9347,7 +9268,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9362,7 +9283,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [], @@ -9408,4564 +9329,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/tableList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/table" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEmail" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnEnum" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnFloat" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnInteger" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnString" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnUrl" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ] - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIndex" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - } - } - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - } - } - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null - } - } - } - } - } - } - } - }, "\/functions": { "get": { "summary": "List functions", @@ -13990,7 +9353,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14064,7 +9427,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14298,7 +9661,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14348,7 +9711,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14399,7 +9762,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14459,7 +9822,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14690,7 +10053,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14752,7 +10115,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14833,7 +10196,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14917,7 +10280,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -15014,7 +10377,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15100,7 +10463,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15204,7 +10567,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15302,7 +10665,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15365,7 +10728,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15430,7 +10793,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15521,7 +10884,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15593,7 +10956,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15670,7 +11033,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15787,7 +11150,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15854,7 +11217,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15926,7 +11289,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15986,7 +11349,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16078,7 +11441,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16148,7 +11511,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16240,7 +11603,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16312,7 +11675,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16366,7 +11729,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18169,7 +13532,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18246,7 +13609,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18391,7 +13754,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18538,7 +13901,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18713,7 +14076,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18892,7 +14255,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -19002,7 +14365,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19115,7 +14478,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19169,7 +14532,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19232,7 +14595,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19308,7 +14671,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19384,7 +14747,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19461,7 +14824,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19567,7 +14930,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19676,7 +15039,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19762,7 +15125,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19851,7 +15214,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -19967,7 +15330,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20086,7 +15449,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -20182,7 +15545,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -20281,7 +15644,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20387,7 +15750,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20496,7 +15859,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20640,7 +16003,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20786,7 +16149,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -20882,7 +16245,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -20981,7 +16344,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21077,7 +16440,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21176,7 +16539,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21272,7 +16635,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21371,7 +16734,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21467,7 +16830,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21566,7 +16929,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21620,7 +16983,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21683,7 +17046,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21759,7 +17122,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21835,7 +17198,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -21910,7 +17273,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -21994,7 +17357,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22055,7 +17418,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22133,7 +17496,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22196,7 +17559,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22272,7 +17635,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22357,7 +17720,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22449,7 +17812,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22513,7 +17876,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22590,7 +17953,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22661,7 +18024,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -22911,7 +18274,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -22961,7 +18324,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23012,7 +18375,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23072,7 +18435,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23318,7 +18681,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23380,7 +18743,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23461,7 +18824,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23545,7 +18908,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23647,7 +19010,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23728,7 +19091,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -23832,7 +19195,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -23931,7 +19294,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -23994,7 +19357,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24059,7 +19422,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24150,7 +19513,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24222,7 +19585,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24294,7 +19657,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24357,7 +19720,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24429,7 +19792,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24489,7 +19852,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24581,7 +19944,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24651,7 +20014,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24743,7 +20106,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26059,6 +21422,4936 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27138,7 +27431,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27219,7 +27512,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27309,7 +27602,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27370,7 +27663,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27441,7 +27734,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30747,8 +31040,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30812,7 +31105,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "error": { "description": "Error", @@ -30844,7 +31138,13 @@ "code", "type", "version" - ] + ], + "example": { + "message": "Not found", + "code": "404", + "type": "not_found", + "version": "1.0" + } }, "rowList": { "description": "Rows List", @@ -30868,7 +31168,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -30892,7 +31196,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -30916,7 +31224,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -30940,7 +31252,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -30964,7 +31280,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -30988,7 +31308,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31012,7 +31336,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31036,7 +31364,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31060,7 +31392,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31084,7 +31420,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31108,7 +31448,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31132,7 +31476,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31156,7 +31504,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31180,7 +31532,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31204,7 +31560,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31228,7 +31588,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31252,7 +31616,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31276,7 +31644,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31300,7 +31672,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31324,7 +31700,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31348,7 +31728,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31372,7 +31756,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31396,7 +31784,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31420,7 +31812,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31444,7 +31840,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31468,7 +31868,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31492,7 +31896,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31516,7 +31924,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31540,7 +31952,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31564,7 +31980,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31588,7 +32008,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31612,7 +32036,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31636,7 +32064,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31660,7 +32092,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31684,7 +32120,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31714,6 +32154,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31721,8 +32166,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31832,7 +32286,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -31887,7 +32355,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -31962,7 +32434,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32039,7 +32524,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32116,7 +32614,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32178,7 +32689,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32246,7 +32768,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32323,7 +32857,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32391,7 +32938,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32459,7 +33018,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32527,7 +33098,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32619,7 +33202,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32729,7 +33328,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32784,7 +33397,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -32859,7 +33476,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -32936,7 +33566,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33013,7 +33656,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33075,7 +33731,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33143,7 +33810,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33220,7 +33899,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33288,7 +33980,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33356,7 +34060,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33424,7 +34140,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33516,7 +34244,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33594,7 +34338,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33672,7 +34428,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33729,7 +34497,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33789,7 +34568,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -33923,7 +34718,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34084,7 +34902,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34098,7 +34942,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34112,7 +34959,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34126,7 +34976,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34140,7 +34993,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34182,7 +35038,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34214,7 +35077,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34249,12 +35118,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34441,7 +35321,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34509,7 +35422,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34553,7 +35478,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34567,7 +35500,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34617,7 +35553,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34637,7 +35582,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34719,7 +35668,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34811,7 +35775,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -34861,7 +35844,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -34912,7 +35904,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35003,7 +36006,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35189,7 +36209,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35378,7 +36429,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35437,7 +36518,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35492,7 +36583,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35530,7 +36639,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35704,7 +36820,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35835,7 +36980,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -35891,7 +37065,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -35911,7 +37095,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -35931,7 +37119,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -35957,7 +37149,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36009,7 +37206,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36035,7 +37241,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36055,7 +37266,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36070,7 +37285,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36097,7 +37315,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36141,7 +37364,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36170,7 +37401,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36190,7 +37426,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36224,7 +37464,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36256,7 +37502,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36276,7 +37528,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36296,7 +37554,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36328,7 +37590,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36394,7 +37662,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36504,7 +37787,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36566,7 +37875,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36640,7 +37959,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36702,7 +38041,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "securitySchemes": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 21264f2afb..5fd7944eff 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4504,7 +4504,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4520,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -4589,7 +4589,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4605,12 +4605,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4634,9 +4635,10 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } } ], @@ -4734,7 +4736,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4750,7 +4752,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -4814,7 +4816,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4827,7 +4829,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4843,12 +4845,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4871,10 +4874,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -4968,7 +4972,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4984,7 +4988,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -5068,7 +5072,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5084,7 +5088,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -5125,615 +5129,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/functions\/{functionId}\/executions": { "get": { "summary": "List executions", @@ -5758,7 +5153,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5831,7 +5226,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5947,7 +5342,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6018,7 +5413,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6091,7 +5486,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6572,7 +5967,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6656,7 +6051,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7461,6 +6856,619 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8488,8 +8496,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8552,7 +8560,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -8577,7 +8586,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8602,7 +8615,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8627,7 +8644,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8652,7 +8673,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8677,7 +8702,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8702,7 +8731,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8727,7 +8760,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8752,7 +8789,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8777,7 +8818,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8802,7 +8847,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8827,7 +8876,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8852,7 +8905,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8877,7 +8934,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8902,7 +8963,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8927,7 +8992,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8984,7 +9053,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -8999,17 +9079,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -9041,7 +9124,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9175,7 +9274,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9338,7 +9460,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9352,7 +9500,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9366,7 +9517,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9380,7 +9534,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9394,7 +9551,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9436,7 +9596,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9468,7 +9635,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9503,12 +9676,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9695,7 +9879,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9763,7 +9980,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9807,7 +10036,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9821,7 +10058,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9871,7 +10111,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9891,7 +10140,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9973,7 +10226,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -10025,7 +10293,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10116,7 +10395,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10249,7 +10545,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10269,7 +10594,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10289,7 +10618,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10315,7 +10648,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10367,7 +10705,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10393,7 +10740,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10413,7 +10765,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10445,7 +10801,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10465,7 +10827,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10485,7 +10853,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10517,7 +10889,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10592,7 +10970,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10654,7 +11052,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index c8597b8b80..6b76ee4f2f 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4521,7 +4521,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4584,7 +4584,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4655,7 +4655,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4703,7 +4703,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4718,12 +4718,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4739,29 +4740,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4823,7 +4806,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4838,19 +4821,21 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4863,33 +4848,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4926,6 +4889,18 @@ "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4961,7 +4936,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4976,12 +4951,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4996,28 +4972,11 @@ } ], "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -5041,7 +5000,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -5077,7 +5036,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5092,12 +5051,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5114,30 +5074,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5186,7 +5127,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5201,12 +5142,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5226,33 +5168,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5320,7 +5240,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5335,12 +5255,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5356,29 +5277,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5427,7 +5330,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5442,7 +5345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [] @@ -5511,7 +5414,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5526,7 +5429,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [] @@ -5620,7 +5523,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5635,7 +5538,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [] @@ -5691,7 +5594,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5706,7 +5609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [] @@ -5796,7 +5699,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5811,7 +5714,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [] @@ -5867,7 +5770,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5882,7 +5785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [] @@ -5952,7 +5855,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5967,7 +5870,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [] @@ -6062,7 +5965,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6077,7 +5980,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [] @@ -6174,7 +6077,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6189,7 +6092,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [] @@ -6284,7 +6187,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6299,7 +6202,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6396,7 +6299,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6411,7 +6314,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [] @@ -6506,7 +6409,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6521,7 +6424,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [] @@ -6618,7 +6521,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6633,7 +6536,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [] @@ -6738,7 +6641,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6753,7 +6656,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [] @@ -6860,7 +6763,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6875,7 +6778,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [] @@ -6982,7 +6885,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6997,7 +6900,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [] @@ -7106,7 +7009,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7121,7 +7024,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [] @@ -7228,7 +7131,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7243,7 +7146,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [] @@ -7352,7 +7255,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7367,7 +7270,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [] @@ -7462,7 +7365,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7477,7 +7380,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [] @@ -7574,7 +7477,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7589,7 +7492,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [] @@ -7711,7 +7614,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7726,7 +7629,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [] @@ -7834,7 +7737,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7849,7 +7752,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [] @@ -7952,7 +7855,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7967,7 +7870,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [] @@ -8062,7 +7965,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8077,7 +7980,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [] @@ -8203,7 +8106,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8218,7 +8121,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [] @@ -8276,7 +8179,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8291,7 +8194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [] @@ -8356,7 +8259,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8371,7 +8274,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8462,7 +8365,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8478,7 +8381,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -8547,7 +8450,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8563,12 +8466,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8592,14 +8496,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8619,10 +8525,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8707,7 +8614,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8720,7 +8627,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8736,12 +8643,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8761,10 +8669,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8830,7 +8739,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8843,7 +8752,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8859,7 +8768,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [] @@ -8926,7 +8835,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8939,7 +8848,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8955,7 +8864,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [] @@ -9029,7 +8938,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9045,7 +8954,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -9109,7 +9018,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -9122,7 +9031,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9138,12 +9047,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9166,10 +9076,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -9263,7 +9174,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9279,7 +9190,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -9363,7 +9274,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9379,7 +9290,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -9444,7 +9355,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9459,7 +9370,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDb.listRowLogs" }, "auth": { "Project": [] @@ -9536,7 +9447,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9552,7 +9463,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [] @@ -9646,7 +9557,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9662,7 +9573,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [] @@ -9754,7 +9665,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9769,7 +9680,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [] @@ -9837,7 +9748,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9852,7 +9763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [] @@ -9968,7 +9879,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9983,7 +9894,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [] @@ -10041,7 +9952,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10056,7 +9967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [] @@ -10119,7 +10030,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10134,7 +10045,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDb.listTableLogs" }, "auth": { "Project": [] @@ -10201,7 +10112,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10216,7 +10127,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDb.getTableUsage" }, "auth": { "Project": [] @@ -10247,7 +10158,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10267,4666 +10178,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "", - "default": "", - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "schema": { - "$ref": "#\/definitions\/usageTable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "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", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -14951,7 +10202,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -14966,12 +10217,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -14989,31 +10241,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/logList" - } - ], - "description": "" } ], "auth": { @@ -15052,7 +10284,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -15071,12 +10303,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -15088,12 +10320,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15111,31 +10344,11 @@ } ], "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -15167,7 +10380,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15203,7 +10416,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15275,7 +10488,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15526,7 +10739,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15575,7 +10788,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15625,7 +10838,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15719,7 +10932,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15777,7 +10990,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15811,7 +11024,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15847,7 +11060,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15906,7 +11119,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16153,7 +11366,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16214,7 +11427,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16291,7 +11504,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16371,7 +11584,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16463,7 +11676,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16548,7 +11761,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16654,7 +11867,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16750,7 +11963,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16812,7 +12025,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16879,7 +12092,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -16964,7 +12177,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17031,7 +12244,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17104,7 +12317,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17220,7 +12433,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17284,7 +12497,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17351,7 +12564,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17393,7 +12606,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17429,7 +12642,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17488,7 +12701,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17578,7 +12791,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17645,7 +12858,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17737,7 +12950,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17806,7 +13019,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17879,7 +13092,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -19621,7 +14834,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19696,7 +14909,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19854,7 +15067,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20009,7 +15222,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20204,7 +15417,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20398,7 +15611,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20516,7 +15729,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20630,7 +15843,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20685,7 +15898,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20745,7 +15958,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20817,7 +16030,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20889,7 +16102,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20964,7 +16177,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -21079,7 +16292,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21192,7 +16405,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21283,7 +16496,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21372,7 +16585,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21499,7 +16712,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21624,7 +16837,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -21727,7 +16940,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -21828,7 +17041,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21943,7 +17156,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22056,7 +17269,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22215,7 +17428,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22371,7 +17584,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22474,7 +17687,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22575,7 +17788,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22678,7 +17891,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22779,7 +17992,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22882,7 +18095,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22983,7 +18196,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -23086,7 +18299,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23185,7 +18398,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23240,7 +18453,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23300,7 +18513,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23372,7 +18585,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23444,7 +18657,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23517,7 +18730,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23605,7 +18818,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23665,7 +18878,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23744,7 +18957,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23804,7 +19017,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23876,7 +19089,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23957,7 +19170,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -24044,7 +19257,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -24107,7 +19320,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24177,7 +19390,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24250,7 +19463,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24342,7 +19555,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24430,7 +19643,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24476,6 +19689,12 @@ "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "default": null, "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false } }, "required": [ @@ -24514,7 +19733,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24592,7 +19811,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24663,7 +19882,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24782,7 +20001,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24902,7 +20121,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -25014,7 +20233,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25125,7 +20344,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25183,7 +20402,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25236,7 +20455,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -27227,7 +22446,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27297,7 +22516,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27380,7 +22599,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27446,7 +22665,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27532,7 +22751,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -28657,7 +23876,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -31076,7 +26295,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", "demo": "proxy\/create-a-p-i-rule.md", @@ -31146,7 +26365,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31229,7 +26448,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31349,7 +26568,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31601,7 +26820,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31673,7 +26892,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31940,7 +27159,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31989,7 +27208,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -32039,7 +27258,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32133,7 +27352,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32191,7 +27410,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32225,7 +27444,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32261,7 +27480,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32320,7 +27539,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32582,7 +27801,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32643,7 +27862,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32720,7 +27939,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32800,7 +28019,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32900,7 +28119,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32979,7 +28198,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -33085,7 +28304,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33182,7 +28401,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33244,7 +28463,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33311,7 +28530,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33396,7 +28615,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33463,7 +28682,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33534,7 +28753,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33598,7 +28817,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33665,7 +28884,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33707,7 +28926,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33743,7 +28962,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33802,7 +29021,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33892,7 +29111,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33959,7 +29178,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -34051,7 +29270,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35371,7 +30590,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35449,7 +30668,5232 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tables-db\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDbListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tables-db\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDbListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tables-db\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDbGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tables-db\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/get-usage.md" + } + ], + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36564,7 +37008,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36644,7 +37088,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36728,7 +37172,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36788,7 +37232,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36859,7 +37303,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37960,7 +38404,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -40957,8 +41401,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -41021,7 +41465,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -41046,7 +41491,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41071,7 +41520,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41096,7 +41549,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41121,7 +41578,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41146,7 +41607,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41171,7 +41636,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41196,7 +41665,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41221,7 +41694,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41246,7 +41723,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41271,7 +41752,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41296,7 +41781,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41321,7 +41810,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41346,7 +41839,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41371,7 +41868,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41396,7 +41897,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41421,7 +41926,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41446,7 +41955,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41471,7 +41984,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41496,7 +42013,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41521,7 +42042,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41546,7 +42071,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41571,7 +42100,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41596,7 +42129,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41621,7 +42158,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41646,7 +42187,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41671,7 +42216,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41696,7 +42245,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41721,7 +42274,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41746,7 +42303,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41771,7 +42332,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41796,7 +42361,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41821,7 +42390,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41846,7 +42419,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41871,7 +42448,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41896,7 +42477,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41921,7 +42506,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41946,7 +42535,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41971,7 +42564,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41996,7 +42593,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -42021,7 +42622,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -42046,7 +42651,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42071,7 +42680,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42096,7 +42709,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42121,7 +42738,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42146,7 +42767,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42171,7 +42796,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42196,7 +42825,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42221,7 +42854,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42246,7 +42883,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42276,6 +42917,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42283,8 +42929,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42395,7 +43050,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42450,7 +43119,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42525,7 +43198,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42602,7 +43288,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42679,7 +43378,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42741,7 +43453,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42809,7 +43532,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42886,7 +43621,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42954,7 +43702,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -43022,7 +43782,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43090,7 +43862,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43182,7 +43966,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43293,7 +44093,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43348,7 +44162,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43423,7 +44241,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43500,7 +44331,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43577,7 +44421,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43639,7 +44496,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43707,7 +44575,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43784,7 +44664,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43852,7 +44745,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43920,7 +44825,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43988,7 +44905,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44080,7 +45009,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44158,7 +45103,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44236,7 +45193,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44293,7 +45262,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44308,17 +45288,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -44350,7 +45333,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44484,7 +45483,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44647,7 +45669,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44661,7 +45709,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44675,7 +45726,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44689,7 +45743,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44703,7 +45760,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44745,7 +45805,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44777,7 +45844,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44812,12 +45885,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -45004,7 +46088,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45072,7 +46189,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45116,7 +46245,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45130,7 +46267,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45180,7 +46320,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45200,7 +46349,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45282,7 +46435,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45374,7 +46542,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45424,7 +46611,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45476,7 +46672,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45567,7 +46774,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45754,7 +46978,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45851,7 +47106,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45913,7 +47183,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46103,7 +47384,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46234,7 +47545,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46266,7 +47596,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46316,7 +47652,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46360,7 +47705,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46410,7 +47763,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46466,7 +47828,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46522,7 +47894,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46554,7 +47936,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46580,7 +47968,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46607,7 +48000,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46621,7 +48019,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46680,7 +48081,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46736,7 +48147,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46774,7 +48203,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46948,7 +48384,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -47081,7 +48546,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47381,9 +48875,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47485,7 +48979,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47495,7 +48989,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47588,7 +49150,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47656,7 +49236,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47715,7 +49306,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47735,7 +49336,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47773,7 +49378,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47841,7 +49453,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47897,7 +49521,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47917,7 +49551,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47937,7 +49575,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47963,7 +49605,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -48015,7 +49662,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -48041,7 +49697,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -48061,7 +49722,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -48076,7 +49741,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48103,7 +49771,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48147,7 +49820,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48176,7 +49857,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48197,7 +49883,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48231,7 +49921,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48381,7 +50077,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48514,7 +50229,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48545,7 +50277,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48576,7 +50313,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48624,7 +50366,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48689,7 +50438,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48754,7 +50512,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48972,7 +50739,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49180,7 +50974,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49449,7 +51269,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49708,7 +51561,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49982,7 +51867,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -50002,7 +51921,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -50036,7 +51959,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -50135,7 +52064,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -50161,7 +52107,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50211,7 +52162,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50232,6 +52192,11 @@ "description": "AAAA target for your Appwrite custom domains.", "x-example": "::1" }, + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" + }, "_APP_STORAGE_LIMIT": { "type": "integer", "description": "Maximum file size allowed for file upload in bytes.", @@ -50289,6 +52254,7 @@ "_APP_DOMAIN_TARGET_CNAME", "_APP_DOMAIN_TARGET_A", "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", "_APP_STORAGE_LIMIT", "_APP_COMPUTE_SIZE_LIMIT", "_APP_USAGE_STATS", @@ -50299,7 +52265,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50331,7 +52313,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50351,7 +52339,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50371,7 +52365,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50403,7 +52401,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50470,7 +52474,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50581,7 +52600,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50643,7 +52688,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50718,7 +52773,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50780,7 +52855,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50870,7 +52956,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50940,7 +53042,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index a7f93152d1..833c1a0612 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4209,7 +4209,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4224,12 +4224,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4246,30 +4247,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4332,7 +4314,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4347,12 +4329,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4360,7 +4343,8 @@ "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4373,34 +4357,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4438,6 +4399,18 @@ "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4473,7 +4446,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4488,12 +4461,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4511,31 +4485,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4585,7 +4539,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4600,12 +4554,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4626,34 +4581,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4722,7 +4654,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4737,12 +4669,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4759,30 +4692,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4832,7 +4746,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4847,7 +4761,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [], @@ -4917,7 +4831,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4932,7 +4846,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [], @@ -5027,7 +4941,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5042,7 +4956,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [], @@ -5099,7 +5013,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5114,7 +5028,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [], @@ -5205,7 +5119,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5220,7 +5134,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [], @@ -5277,7 +5191,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5292,7 +5206,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [], @@ -5363,7 +5277,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5378,7 +5292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [], @@ -5474,7 +5388,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5489,7 +5403,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [], @@ -5587,7 +5501,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5602,7 +5516,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [], @@ -5698,7 +5612,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5713,7 +5627,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5811,7 +5725,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5826,7 +5740,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [], @@ -5922,7 +5836,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5937,7 +5851,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [], @@ -6035,7 +5949,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6050,7 +5964,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [], @@ -6156,7 +6070,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6171,7 +6085,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [], @@ -6279,7 +6193,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6294,7 +6208,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [], @@ -6402,7 +6316,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6417,7 +6331,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [], @@ -6527,7 +6441,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6542,7 +6456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [], @@ -6650,7 +6564,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6665,7 +6579,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [], @@ -6775,7 +6689,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6790,7 +6704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [], @@ -6886,7 +6800,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6901,7 +6815,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [], @@ -6999,7 +6913,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7014,7 +6928,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [], @@ -7137,7 +7051,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7152,7 +7066,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [], @@ -7261,7 +7175,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7276,7 +7190,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [], @@ -7380,7 +7294,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7395,7 +7309,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [], @@ -7491,7 +7405,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7506,7 +7420,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [], @@ -7633,7 +7547,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7648,7 +7562,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [], @@ -7707,7 +7621,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7722,7 +7636,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [], @@ -7788,7 +7702,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7803,7 +7717,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7895,7 +7809,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7911,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [], @@ -7982,7 +7896,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7998,12 +7912,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -8028,14 +7943,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -8056,10 +7973,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8146,7 +8064,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8159,7 +8077,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8175,12 +8093,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8201,10 +8120,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8271,7 +8191,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8284,7 +8204,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8300,7 +8220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [], @@ -8368,7 +8288,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8381,7 +8301,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8397,7 +8317,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [], @@ -8472,7 +8392,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8488,7 +8408,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [], @@ -8554,7 +8474,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8567,7 +8487,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8583,12 +8503,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8612,10 +8533,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -8711,7 +8633,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8727,7 +8649,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [], @@ -8813,7 +8735,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8829,7 +8751,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [], @@ -8898,7 +8820,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8914,7 +8836,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [], @@ -9009,7 +8931,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9025,7 +8947,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [], @@ -9118,7 +9040,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9133,7 +9055,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [], @@ -9202,7 +9124,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9217,7 +9139,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [], @@ -9334,7 +9256,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9349,7 +9271,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [], @@ -9408,7 +9330,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9423,7 +9345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [], @@ -9463,4469 +9385,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "", - "default": "", - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, "\/functions": { "get": { "summary": "List functions", @@ -13950,7 +9409,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14023,7 +9482,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14275,7 +9734,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14325,7 +9784,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14376,7 +9835,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14436,7 +9895,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14684,7 +10143,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14746,7 +10205,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14824,7 +10283,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14905,7 +10364,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -14998,7 +10457,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15084,7 +10543,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15191,7 +10650,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15288,7 +10747,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15351,7 +10810,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15419,7 +10878,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15505,7 +10964,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15573,7 +11032,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15648,7 +11107,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15766,7 +11225,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15832,7 +11291,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15900,7 +11359,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15960,7 +11419,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16051,7 +11510,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16119,7 +11578,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16212,7 +11671,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16282,7 +11741,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16357,7 +11816,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18139,7 +13598,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18215,7 +13674,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18374,7 +13833,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18530,7 +13989,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18726,7 +14185,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18921,7 +14380,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -19040,7 +14499,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19155,7 +14614,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19211,7 +14670,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19272,7 +14731,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19345,7 +14804,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19418,7 +14877,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19494,7 +14953,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19610,7 +15069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19724,7 +15183,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19816,7 +15275,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19906,7 +15365,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -20034,7 +15493,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20160,7 +15619,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -20264,7 +15723,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -20366,7 +15825,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20482,7 +15941,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20596,7 +16055,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20756,7 +16215,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20913,7 +16372,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21017,7 +16476,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21119,7 +16578,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21223,7 +16682,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21325,7 +16784,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21429,7 +16888,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +16990,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21635,7 +17094,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21735,7 +17194,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21791,7 +17250,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21852,7 +17311,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21925,7 +17384,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21998,7 +17457,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22072,7 +17531,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22161,7 +17620,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22222,7 +17681,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22302,7 +17761,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22363,7 +17822,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22436,7 +17895,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22518,7 +17977,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22607,7 +18066,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22671,7 +18130,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22743,7 +18202,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22816,7 +18275,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -23084,7 +18543,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -23134,7 +18593,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23185,7 +18644,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23245,7 +18704,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23508,7 +18967,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23570,7 +19029,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23648,7 +19107,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23729,7 +19188,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23830,7 +19289,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23910,7 +19369,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -24017,7 +19476,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -24115,7 +19574,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -24178,7 +19637,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24246,7 +19705,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24332,7 +19791,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24400,7 +19859,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24472,7 +19931,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24537,7 +19996,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24605,7 +20064,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24665,7 +20124,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24756,7 +20215,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24824,7 +20283,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24917,7 +20376,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26201,6 +21660,4844 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27260,7 +27557,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27341,7 +27638,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27426,7 +27723,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27487,7 +27784,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27559,7 +27856,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30888,8 +31185,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30952,7 +31249,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -30977,7 +31275,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -31002,7 +31304,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -31027,7 +31333,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -31052,7 +31362,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -31077,7 +31391,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -31102,7 +31420,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31127,7 +31449,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31152,7 +31478,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31177,7 +31507,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31202,7 +31536,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31227,7 +31565,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31252,7 +31594,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31277,7 +31623,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31302,7 +31652,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31327,7 +31681,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31352,7 +31710,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31377,7 +31739,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31402,7 +31768,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31427,7 +31797,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31452,7 +31826,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31477,7 +31855,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31502,7 +31884,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31527,7 +31913,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31552,7 +31942,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31577,7 +31971,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31602,7 +32000,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31627,7 +32029,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31652,7 +32058,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31677,7 +32087,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31702,7 +32116,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31727,7 +32145,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31752,7 +32174,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31777,7 +32203,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31802,7 +32232,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31827,7 +32261,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31857,6 +32295,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31864,8 +32307,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31976,7 +32428,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -32031,7 +32497,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -32106,7 +32576,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32183,7 +32666,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32260,7 +32756,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32322,7 +32831,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32390,7 +32910,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32467,7 +32999,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32535,7 +33080,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32603,7 +33160,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32671,7 +33240,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32763,7 +33344,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32874,7 +33471,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32929,7 +33540,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -33004,7 +33619,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -33081,7 +33709,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33158,7 +33799,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33220,7 +33874,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33288,7 +33953,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33365,7 +34042,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33433,7 +34123,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33501,7 +34203,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33569,7 +34283,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33661,7 +34387,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33739,7 +34481,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33817,7 +34571,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33874,7 +34640,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33889,17 +34666,20 @@ "type": "integer", "description": "Document automatically incrementing ID.", "x-example": 1, - "format": "int32" + "format": "int32", + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", - "x-example": "5e5ea5c15117e" + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", @@ -33931,7 +34711,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -34065,7 +34861,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34228,7 +35047,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34242,7 +35087,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34256,7 +35104,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34270,7 +35121,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34284,7 +35138,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34326,7 +35183,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34358,7 +35222,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34393,12 +35263,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34585,7 +35466,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34653,7 +35567,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34697,7 +35623,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34711,7 +35645,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34761,7 +35698,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34781,7 +35727,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34863,7 +35813,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34955,7 +35920,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -35005,7 +35989,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -35057,7 +36050,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35148,7 +36152,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35335,7 +36356,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35525,7 +36577,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35584,7 +36666,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35640,7 +36732,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35678,7 +36788,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35852,7 +36969,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35985,7 +37131,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -36041,7 +37216,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -36061,7 +37246,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -36081,7 +37270,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -36107,7 +37300,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36159,7 +37357,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36185,7 +37392,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36205,7 +37417,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36220,7 +37436,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36247,7 +37466,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36291,7 +37515,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36320,7 +37552,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36340,7 +37577,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36374,7 +37615,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36406,7 +37653,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36426,7 +37679,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36446,7 +37705,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36478,7 +37741,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36545,7 +37814,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36656,7 +37940,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36718,7 +38028,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36793,7 +38113,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36855,7 +38195,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index f875b23616..5fd7944eff 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4504,7 +4504,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4520,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -4589,7 +4589,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -4605,12 +4605,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -4634,9 +4635,10 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } } ], @@ -4734,7 +4736,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -4750,7 +4752,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -4814,7 +4816,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4827,7 +4829,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -4843,12 +4845,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4871,10 +4874,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -4968,7 +4972,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -4984,7 +4988,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -5068,7 +5072,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5084,7 +5088,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -5125,615 +5129,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/functions\/{functionId}\/executions": { "get": { "summary": "List executions", @@ -5758,7 +5153,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5831,7 +5226,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5947,7 +5342,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6018,7 +5413,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6091,7 +5486,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6572,7 +5967,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6656,7 +6051,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -7461,6 +6856,619 @@ ] } }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -8488,8 +8496,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -8552,7 +8560,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -8577,7 +8586,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -8602,7 +8615,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "sessionList": { "description": "Sessions List", @@ -8627,7 +8644,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -8652,7 +8673,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -8677,7 +8702,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -8702,7 +8731,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "teamList": { "description": "Teams List", @@ -8727,7 +8760,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -8752,7 +8789,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "executionList": { "description": "Executions List", @@ -8777,7 +8818,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -8802,7 +8847,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -8827,7 +8876,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -8852,7 +8905,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -8877,7 +8934,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -8902,7 +8963,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -8927,7 +8992,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "row": { "description": "Row", @@ -8984,7 +9053,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -9044,7 +9124,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -9178,7 +9274,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -9341,7 +9460,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -9355,7 +9500,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -9369,7 +9517,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -9383,7 +9534,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -9397,7 +9551,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -9439,7 +9596,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -9471,7 +9635,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -9506,12 +9676,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -9698,7 +9879,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -9766,7 +9980,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -9810,7 +10036,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -9824,7 +10058,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -9874,7 +10111,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -9894,7 +10140,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -9976,7 +10226,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "team": { "description": "Team", @@ -10028,7 +10293,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -10119,7 +10395,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "execution": { "description": "Execution", @@ -10252,7 +10545,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "country": { "description": "Country", @@ -10272,7 +10594,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -10292,7 +10618,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -10318,7 +10648,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -10370,7 +10705,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -10396,7 +10740,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "headers": { "description": "Headers", @@ -10416,7 +10765,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -10448,7 +10801,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -10468,7 +10827,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -10488,7 +10853,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -10520,7 +10889,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "subscriber": { "description": "Subscriber", @@ -10595,7 +10970,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -10657,7 +11052,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index d44f1ee6cb..6b76ee4f2f 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4521,7 +4521,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4584,7 +4584,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 480, + "weight": 488, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4655,7 +4655,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -4703,7 +4703,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4718,12 +4718,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4739,29 +4740,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4823,7 +4806,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4838,19 +4821,21 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4863,33 +4848,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4926,6 +4889,18 @@ "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4961,7 +4936,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 323, + "weight": 324, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -4976,12 +4951,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" }, "methods": [ { "name": "listUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -4996,28 +4972,11 @@ } ], "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/list-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseUsage" + "replaceWith": "tablesDb.listUsage" } - }, - { - "name": "listDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -5041,7 +5000,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -5077,7 +5036,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5092,12 +5051,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5114,30 +5074,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5186,7 +5127,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5201,12 +5142,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5226,33 +5168,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -5320,7 +5240,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5335,12 +5255,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -5356,29 +5277,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -5427,7 +5330,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5442,7 +5345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [] @@ -5511,7 +5414,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5526,7 +5429,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [] @@ -5620,7 +5523,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5635,7 +5538,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [] @@ -5691,7 +5594,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5706,7 +5609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [] @@ -5796,7 +5699,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5811,7 +5714,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [] @@ -5867,7 +5770,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5882,7 +5785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [] @@ -5952,7 +5855,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5967,7 +5870,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [] @@ -6062,7 +5965,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6077,7 +5980,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [] @@ -6174,7 +6077,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6189,7 +6092,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [] @@ -6284,7 +6187,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6299,7 +6202,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6396,7 +6299,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6411,7 +6314,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [] @@ -6506,7 +6409,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6521,7 +6424,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [] @@ -6618,7 +6521,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6633,7 +6536,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [] @@ -6738,7 +6641,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6753,7 +6656,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [] @@ -6860,7 +6763,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6875,7 +6778,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [] @@ -6982,7 +6885,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6997,7 +6900,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [] @@ -7106,7 +7009,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7121,7 +7024,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [] @@ -7228,7 +7131,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7243,7 +7146,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [] @@ -7352,7 +7255,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7367,7 +7270,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [] @@ -7462,7 +7365,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7477,7 +7380,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [] @@ -7574,7 +7477,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7589,7 +7492,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [] @@ -7711,7 +7614,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7726,7 +7629,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [] @@ -7834,7 +7737,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7849,7 +7752,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [] @@ -7952,7 +7855,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7967,7 +7870,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [] @@ -8062,7 +7965,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8077,7 +7980,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [] @@ -8203,7 +8106,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8218,7 +8121,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [] @@ -8276,7 +8179,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8291,7 +8194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [] @@ -8356,7 +8259,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8371,7 +8274,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8462,7 +8365,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8478,7 +8381,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [] @@ -8547,7 +8450,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -8563,12 +8466,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [] }, @@ -8592,14 +8496,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [] }, @@ -8619,10 +8525,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8707,7 +8614,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8720,7 +8627,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8736,12 +8643,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -8761,10 +8669,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8830,7 +8739,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8843,7 +8752,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8859,7 +8768,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [] @@ -8926,7 +8835,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8939,7 +8848,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8955,7 +8864,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [] @@ -9029,7 +8938,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9045,7 +8954,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [] @@ -9109,7 +9018,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -9122,7 +9031,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9138,12 +9047,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -9166,10 +9076,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -9263,7 +9174,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9279,7 +9190,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [] @@ -9363,7 +9274,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9379,7 +9290,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [] @@ -9444,7 +9355,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -9459,7 +9370,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRowLogs" + "replaceWith": "tablesDb.listRowLogs" }, "auth": { "Project": [] @@ -9536,7 +9447,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -9552,7 +9463,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [] @@ -9646,7 +9557,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9662,7 +9573,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [] @@ -9754,7 +9665,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9769,7 +9680,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [] @@ -9837,7 +9748,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9852,7 +9763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [] @@ -9968,7 +9879,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9983,7 +9894,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [] @@ -10041,7 +9952,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10056,7 +9967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [] @@ -10119,7 +10030,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -10134,7 +10045,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTableLogs" + "replaceWith": "tablesDb.listTableLogs" }, "auth": { "Project": [] @@ -10201,7 +10112,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 330, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -10216,7 +10127,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTableUsage" + "replaceWith": "tablesDb.getTableUsage" }, "auth": { "Project": [] @@ -10247,7 +10158,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -10267,4666 +10178,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "", - "default": "", - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "gridsListTableLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "weight": 375, - "cookies": false, - "type": "", - "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "gridsListRowLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "weight": 413, - "cookies": false, - "type": "", - "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "gridsGetTableUsage", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "schema": { - "$ref": "#\/definitions\/usageTable" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "weight": 376, - "cookies": false, - "type": "", - "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "console" - ], - "packaging": false, - "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", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "GridUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d", - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, "\/databases\/{databaseId}\/logs": { "get": { "summary": "List database logs", @@ -14951,7 +10202,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -14966,12 +10217,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" }, "methods": [ { "name": "listLogs", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -14989,31 +10241,11 @@ } ], "description": "Get the database activity logs list by its unique ID.", + "demo": "databases\/list-logs.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabaseLogs" + "replaceWith": "tablesDb.listDatabaseLogs" } - }, - { - "name": "listDatabaseLogs", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/logList" - } - ], - "description": "" } ], "auth": { @@ -15052,7 +10284,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -15071,12 +10303,12 @@ }, "deprecated": true, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 322, + "weight": 323, "cookies": false, "type": "", - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -15088,12 +10320,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" }, "methods": [ { - "name": "getDatabaseUsage", + "name": "getUsage", "namespace": "databases", + "desc": "", "auth": { "Project": [] }, @@ -15111,31 +10344,11 @@ } ], "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "databases\/get-usage.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabaseUsage" + "replaceWith": "tablesDb.getUsage" } - }, - { - "name": "getDatabaseUsage", - "namespace": "grids", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -15167,7 +10380,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15203,7 +10416,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -15275,7 +10488,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -15526,7 +10739,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -15575,7 +10788,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -15625,7 +10838,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 450, + "weight": 458, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -15719,7 +10932,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 449, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -15777,7 +10990,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 443, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -15811,7 +11024,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -15847,7 +11060,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -15906,7 +11119,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -16153,7 +11366,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -16214,7 +11427,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -16291,7 +11504,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -16371,7 +11584,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -16463,7 +11676,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -16548,7 +11761,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -16654,7 +11867,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -16750,7 +11963,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -16812,7 +12025,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -16879,7 +12092,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -16964,7 +12177,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -17031,7 +12244,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -17104,7 +12317,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -17220,7 +12433,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -17284,7 +12497,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -17351,7 +12564,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 442, + "weight": 450, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -17393,7 +12606,7 @@ "30d", "90d" ], - "x-enum-name": "FunctionUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -17429,7 +12642,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -17488,7 +12701,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -17578,7 +12791,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -17645,7 +12858,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -17737,7 +12950,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -17806,7 +13019,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -17879,7 +13092,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -19621,7 +14834,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -19696,7 +14909,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -19854,7 +15067,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -20009,7 +15222,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -20204,7 +15417,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -20398,7 +15611,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -20516,7 +15729,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -20630,7 +15843,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -20685,7 +15898,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -20745,7 +15958,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -20817,7 +16030,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -20889,7 +16102,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -20964,7 +16177,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -21079,7 +16292,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -21192,7 +16405,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -21283,7 +16496,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -21372,7 +16585,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -21499,7 +16712,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -21624,7 +16837,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -21727,7 +16940,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -21828,7 +17041,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -21943,7 +17156,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -22056,7 +17269,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -22215,7 +17428,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -22371,7 +17584,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -22474,7 +17687,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -22575,7 +17788,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -22678,7 +17891,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -22779,7 +17992,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -22882,7 +18095,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -22983,7 +18196,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -23086,7 +18299,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -23185,7 +18398,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -23240,7 +18453,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -23300,7 +18513,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -23372,7 +18585,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -23444,7 +18657,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -23517,7 +18730,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -23605,7 +18818,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -23665,7 +18878,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -23744,7 +18957,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -23804,7 +19017,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -23876,7 +19089,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -23957,7 +19170,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -24044,7 +19257,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -24107,7 +19320,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -24177,7 +19390,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 262, + "weight": 263, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -24250,7 +19463,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 257, + "weight": 258, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -24342,7 +19555,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 264, + "weight": 265, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -24430,7 +19643,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 261, + "weight": 262, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -24476,6 +19689,12 @@ "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", "default": null, "x-example": "[ID1:ID2]" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false } }, "required": [ @@ -24514,7 +19733,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 258, + "weight": 259, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -24592,7 +19811,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 265, + "weight": 266, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -24663,7 +19882,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 260, + "weight": 261, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -24782,7 +20001,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 267, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -24902,7 +20121,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 259, + "weight": 260, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -25014,7 +20233,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 266, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -25125,7 +20344,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 263, + "weight": 264, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -25183,7 +20402,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 268, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -25236,7 +20455,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 269, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -27227,7 +22446,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 419, + "weight": 427, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -27297,7 +22516,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 416, + "weight": 424, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -27380,7 +22599,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 418, + "weight": 426, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -27446,7 +22665,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 417, + "weight": 425, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -27532,7 +22751,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 420, + "weight": 428, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -28657,7 +23876,7 @@ "account", "avatars", "databases", - "tables", + "tablesdb", "locale", "health", "storage", @@ -31076,7 +26295,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 481, + "weight": 489, "cookies": false, "type": "", "demo": "proxy\/create-a-p-i-rule.md", @@ -31146,7 +26365,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 483, + "weight": 491, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -31229,7 +26448,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 484, + "weight": 492, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -31349,7 +26568,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 482, + "weight": 490, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -31601,7 +26820,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -31673,7 +26892,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -31940,7 +27159,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -31989,7 +27208,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -32039,7 +27258,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 475, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -32133,7 +27352,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 476, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -32191,7 +27410,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 477, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -32225,7 +27444,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -32261,7 +27480,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -32320,7 +27539,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -32582,7 +27801,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -32643,7 +27862,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -32720,7 +27939,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -32800,7 +28019,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -32900,7 +28119,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -32979,7 +28198,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -33085,7 +28304,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -33182,7 +28401,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -33244,7 +28463,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -33311,7 +28530,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -33396,7 +28615,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -33463,7 +28682,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -33534,7 +28753,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -33598,7 +28817,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -33665,7 +28884,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 478, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -33707,7 +28926,7 @@ "30d", "90d" ], - "x-enum-name": "SiteUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -33743,7 +28962,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -33802,7 +29021,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -33892,7 +29111,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -33959,7 +29178,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -34051,7 +29270,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -35371,7 +30590,7 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -35449,7 +30668,5232 @@ "30d", "90d" ], - "x-enum-name": "StorageUsageRange", + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbListUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabases", + "schema": { + "$ref": "#\/definitions\/usageDatabases" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "demo": "tables-db\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/list-usage.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "tablesDbListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 383, + "cookies": false, + "type": "", + "demo": "tables-db\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesDbListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 421, + "cookies": false, + "type": "", + "demo": "tables-db\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesDbGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 384, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/usage": { + "get": { + "summary": "Get TablesDB usage stats", + "operationId": "tablesDbGetUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { + "$ref": "#\/definitions\/usageDatabase" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getUsage", + "group": null, + "weight": 376, + "cookies": false, + "type": "", + "demo": "tables-db\/get-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "getUsage", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "demo": "tables-db\/get-usage.md" + } + ], + "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", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -36564,7 +37008,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -36644,7 +37088,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -36728,7 +37172,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -36788,7 +37232,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -36859,7 +37303,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -37960,7 +38404,7 @@ "30d", "90d" ], - "x-enum-name": "UserUsageRange", + "x-enum-name": "UsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -40957,8 +41401,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -41021,7 +41465,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -41046,7 +41491,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -41071,7 +41520,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -41096,7 +41549,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -41121,7 +41578,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -41146,7 +41607,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -41171,7 +41636,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -41196,7 +41665,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -41221,7 +41694,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -41246,7 +41723,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -41271,7 +41752,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -41296,7 +41781,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -41321,7 +41810,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -41346,7 +41839,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -41371,7 +41868,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -41396,7 +41897,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -41421,7 +41926,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -41446,7 +41955,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "templateSiteList": { "description": "Site Templates List", @@ -41471,7 +41984,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "functionList": { "description": "Functions List", @@ -41496,7 +42013,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "templateFunctionList": { "description": "Function Templates List", @@ -41521,7 +42042,11 @@ "required": [ "total", "templates" - ] + ], + "example": { + "total": 5, + "templates": "" + } }, "installationList": { "description": "Installations List", @@ -41546,7 +42071,11 @@ "required": [ "total", "installations" - ] + ], + "example": { + "total": 5, + "installations": "" + } }, "providerRepositoryFrameworkList": { "description": "Framework Provider Repositories List", @@ -41571,7 +42100,11 @@ "required": [ "total", "frameworkProviderRepositories" - ] + ], + "example": { + "total": 5, + "frameworkProviderRepositories": "" + } }, "providerRepositoryRuntimeList": { "description": "Runtime Provider Repositories List", @@ -41596,7 +42129,11 @@ "required": [ "total", "runtimeProviderRepositories" - ] + ], + "example": { + "total": 5, + "runtimeProviderRepositories": "" + } }, "branchList": { "description": "Branches List", @@ -41621,7 +42158,11 @@ "required": [ "total", "branches" - ] + ], + "example": { + "total": 5, + "branches": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -41646,7 +42187,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -41671,7 +42216,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -41696,7 +42245,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -41721,7 +42274,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "projectList": { "description": "Projects List", @@ -41746,7 +42303,11 @@ "required": [ "total", "projects" - ] + ], + "example": { + "total": 5, + "projects": "" + } }, "webhookList": { "description": "Webhooks List", @@ -41771,7 +42332,11 @@ "required": [ "total", "webhooks" - ] + ], + "example": { + "total": 5, + "webhooks": "" + } }, "keyList": { "description": "API Keys List", @@ -41796,7 +42361,11 @@ "required": [ "total", "keys" - ] + ], + "example": { + "total": 5, + "keys": "" + } }, "devKeyList": { "description": "Dev Keys List", @@ -41821,7 +42390,11 @@ "required": [ "total", "devKeys" - ] + ], + "example": { + "total": 5, + "devKeys": "" + } }, "platformList": { "description": "Platforms List", @@ -41846,7 +42419,11 @@ "required": [ "total", "platforms" - ] + ], + "example": { + "total": 5, + "platforms": "" + } }, "countryList": { "description": "Countries List", @@ -41871,7 +42448,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -41896,7 +42477,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -41921,7 +42506,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -41946,7 +42535,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -41971,7 +42564,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -41996,7 +42593,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "proxyRuleList": { "description": "Rule List", @@ -42021,7 +42622,11 @@ "required": [ "total", "rules" - ] + ], + "example": { + "total": 5, + "rules": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -42046,7 +42651,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -42071,7 +42680,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -42096,7 +42709,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -42121,7 +42738,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -42146,7 +42767,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -42171,7 +42796,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "migrationList": { "description": "Migrations List", @@ -42196,7 +42825,11 @@ "required": [ "total", "migrations" - ] + ], + "example": { + "total": 5, + "migrations": "" + } }, "specificationList": { "description": "Specifications List", @@ -42221,7 +42854,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "vcsContentList": { "description": "VCS Content List", @@ -42246,7 +42883,11 @@ "required": [ "total", "contents" - ] + ], + "example": { + "total": 5, + "contents": "" + } }, "database": { "description": "Database", @@ -42276,6 +42917,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -42283,8 +42929,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -42395,7 +43050,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -42450,7 +43119,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -42525,7 +43198,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -42602,7 +43288,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -42679,7 +43378,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -42741,7 +43453,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -42809,7 +43532,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -42886,7 +43621,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -42954,7 +43702,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -43022,7 +43782,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -43090,7 +43862,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -43182,7 +43966,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -43293,7 +44093,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -43348,7 +44162,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -43423,7 +44241,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -43500,7 +44331,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -43577,7 +44421,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -43639,7 +44496,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -43707,7 +44575,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -43784,7 +44664,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -43852,7 +44745,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -43920,7 +44825,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -43988,7 +44905,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -44080,7 +45009,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -44158,7 +45103,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -44236,7 +45193,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -44293,7 +45262,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -44353,7 +45333,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -44487,7 +45483,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -44650,7 +45669,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -44664,7 +45709,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -44678,7 +45726,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -44692,7 +45743,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -44706,7 +45760,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -44748,7 +45805,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -44780,7 +45844,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -44815,12 +45885,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -45007,7 +46088,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -45075,7 +46189,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -45119,7 +46245,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -45133,7 +46267,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -45183,7 +46320,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -45203,7 +46349,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -45285,7 +46435,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -45377,7 +46542,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -45427,7 +46611,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -45479,7 +46672,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -45570,7 +46774,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -45757,7 +46978,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "templateSite": { "description": "Template Site", @@ -45854,7 +47106,22 @@ "providerOwner", "providerVersion", "variables" - ] + ], + "example": { + "key": "starter", + "name": "Starter site", + "tagline": "Minimal web app integrating with Appwrite.", + "demoUrl": "https:\/\/nextjs-starter.appwrite.network\/", + "screenshotDark": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-dark.png", + "screenshotLight": "https:\/\/cloud.appwrite.io\/images\/sites\/templates\/template-for-blog-light.png", + "useCases": "Starter", + "frameworks": [], + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [] + } }, "templateFramework": { "description": "Template Framework", @@ -45916,7 +47183,18 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/build", + "providerRootDirectory": ".\/svelte-kit\/starter", + "buildRuntime": "node-22", + "adapter": "ssr", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -46106,7 +47384,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "templateFunction": { "description": "Template Function", @@ -46237,7 +47545,26 @@ "providerVersion", "variables", "scopes" - ] + ], + "example": { + "icon": "icon-lightning-bolt", + "id": "starter", + "name": "Starter function", + "tagline": "A simple function to get started.", + "permissions": "any", + "events": "account.create", + "cron": "0 0 * * *", + "timeout": 300, + "useCases": "Starter", + "runtimes": [], + "instructions": "For documentation and instructions check out .", + "vcsProvider": "github", + "providerRepositoryId": "templates", + "providerOwner": "appwrite", + "providerVersion": "main", + "variables": [], + "scopes": "users.read" + } }, "templateRuntime": { "description": "Template Runtime", @@ -46269,7 +47596,13 @@ "commands", "entrypoint", "providerRootDirectory" - ] + ], + "example": { + "name": "node-19.0", + "commands": "npm install", + "entrypoint": "index.js", + "providerRootDirectory": "node\/starter" + } }, "templateVariable": { "description": "Template Variable", @@ -46319,7 +47652,16 @@ "placeholder", "required", "type" - ] + ], + "example": { + "name": "APPWRITE_DATABASE_ID", + "description": "The ID of the Appwrite database that contains the collection to sync.", + "value": "512", + "secret": false, + "placeholder": "64a55...7b912", + "required": false, + "type": "password" + } }, "installation": { "description": "Installation", @@ -46363,7 +47705,15 @@ "provider", "organization", "providerInstallationId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "provider": "github", + "organization": "appwrite", + "providerInstallationId": "5322" + } }, "providerRepository": { "description": "ProviderRepository", @@ -46413,7 +47763,16 @@ "private", "defaultBranch", "pushedAt" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime" + } }, "providerRepositoryFramework": { "description": "ProviderRepositoryFramework", @@ -46469,7 +47828,17 @@ "defaultBranch", "pushedAt", "framework" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "framework": "nextjs" + } }, "providerRepositoryRuntime": { "description": "ProviderRepositoryRuntime", @@ -46525,7 +47894,17 @@ "defaultBranch", "pushedAt", "runtime" - ] + ], + "example": { + "id": "5e5ea5c16897e", + "name": "appwrite", + "organization": "appwrite", + "provider": "github", + "private": true, + "defaultBranch": "main", + "pushedAt": "datetime", + "runtime": "node-22" + } }, "detectionFramework": { "description": "DetectionFramework", @@ -46557,7 +47936,13 @@ "installCommand", "buildCommand", "outputDirectory" - ] + ], + "example": { + "framework": "nuxt", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "dist" + } }, "detectionRuntime": { "description": "DetectionRuntime", @@ -46583,7 +47968,12 @@ "runtime", "entrypoint", "commands" - ] + ], + "example": { + "runtime": "node", + "entrypoint": "index.js", + "commands": "npm install && npm run build" + } }, "vcsContent": { "description": "VcsContents", @@ -46610,7 +48000,12 @@ }, "required": [ "name" - ] + ], + "example": { + "size": 1523, + "isDirectory": true, + "name": "Main.java" + } }, "branch": { "description": "Branch", @@ -46624,7 +48019,10 @@ }, "required": [ "name" - ] + ], + "example": { + "name": "main" + } }, "runtime": { "description": "Runtime", @@ -46683,7 +48081,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -46739,7 +48147,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -46777,7 +48203,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -46951,7 +48384,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -47084,7 +48546,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "project": { "description": "Project", @@ -47384,9 +48875,9 @@ "description": "Databases (legacy) service status", "x-example": true }, - "serviceStatusForTables": { + "serviceStatusForTablesdb": { "type": "boolean", - "description": "Tables service status", + "description": "TablesDB service status", "x-example": true }, "serviceStatusForLocale": { @@ -47488,7 +48979,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", - "serviceStatusForTables", + "serviceStatusForTablesdb", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", @@ -47498,7 +48989,75 @@ "serviceStatusForFunctions", "serviceStatusForGraphql", "serviceStatusForMessaging" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authMockNumbers": [ + {} + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + {} + ], + "platforms": {}, + "webhooks": {}, + "keys": {}, + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForGraphql": true, + "serviceStatusForMessaging": true + } }, "webhook": { "description": "Webhook", @@ -47591,7 +49150,25 @@ "enabled", "logs", "attempts" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "security": true, + "httpUser": "username", + "httpPass": "password", + "signatureKey": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } }, "key": { "description": "Key", @@ -47659,7 +49236,18 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "devKey": { "description": "DevKey", @@ -47718,7 +49306,17 @@ "secret", "accessedAt", "sdks" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" + } }, "mockNumber": { "description": "Mock Number", @@ -47738,7 +49336,11 @@ "required": [ "phone", "otp" - ] + ], + "example": { + "phone": "+1612842323", + "otp": "123456" + } }, "authProvider": { "description": "AuthProvider", @@ -47776,7 +49378,14 @@ "appId", "secret", "enabled" - ] + ], + "example": { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": "" + } }, "platform": { "description": "Platform", @@ -47844,7 +49453,19 @@ "hostname", "httpUser", "httpPass" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "key": "com.company.appname", + "store": "", + "hostname": true, + "httpUser": "username", + "httpPass": "password" + } }, "variable": { "description": "Variable", @@ -47900,7 +49521,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -47920,7 +49551,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -47940,7 +49575,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -47966,7 +49605,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -48018,7 +49662,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -48044,7 +49697,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -48064,7 +49722,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -48079,7 +49741,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -48106,7 +49771,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -48150,7 +49820,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -48179,7 +49857,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "metric": { "description": "Metric", @@ -48200,7 +49883,11 @@ "required": [ "value", "date" - ] + ], + "example": { + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" + } }, "metricBreakdown": { "description": "Metric Breakdown", @@ -48234,7 +49921,13 @@ "required": [ "name", "value" - ] + ], + "example": { + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 + } }, "usageDatabases": { "description": "UsageDatabases", @@ -48384,7 +50077,26 @@ "storage", "databasesReads", "databasesWrites" - ] + ], + "example": { + "range": "30d", + "databasesTotal": 0, + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "databases": [], + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databasesReads": [], + "databasesWrites": [] + } }, "usageDatabase": { "description": "UsageDatabase", @@ -48517,7 +50229,24 @@ "storage", "databaseReads", "databaseWrites" - ] + ], + "example": { + "range": "30d", + "collectionsTotal": 0, + "tablesTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "storageTotal": 0, + "databaseReadsTotal": 0, + "databaseWritesTotal": 0, + "collections": [], + "tables": [], + "documents": [], + "rows": [], + "storage": [], + "databaseReads": [], + "databaseWrites": [] + } }, "usageTable": { "description": "UsageTable", @@ -48548,7 +50277,12 @@ "range", "rowsTotal", "rows" - ] + ], + "example": { + "range": "30d", + "rowsTotal": 0, + "rows": [] + } }, "usageCollection": { "description": "UsageCollection", @@ -48579,7 +50313,12 @@ "range", "documentsTotal", "documents" - ] + ], + "example": { + "range": "30d", + "documentsTotal": 0, + "documents": [] + } }, "usageUsers": { "description": "UsageUsers", @@ -48627,7 +50366,14 @@ "sessionsTotal", "users", "sessions" - ] + ], + "example": { + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] + } }, "usageStorage": { "description": "StorageUsage", @@ -48692,7 +50438,16 @@ "buckets", "files", "storage" - ] + ], + "example": { + "range": "30d", + "bucketsTotal": 0, + "filesTotal": 0, + "filesStorageTotal": 0, + "buckets": [], + "files": [], + "storage": [] + } }, "usageBuckets": { "description": "UsageBuckets", @@ -48757,7 +50512,16 @@ "storage", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "range": "30d", + "filesTotal": 0, + "filesStorageTotal": 0, + "files": [], + "storage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "usageFunctions": { "description": "UsageFunctions", @@ -48975,7 +50739,34 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "functionsTotal": 0, + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "functions": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageFunction": { "description": "UsageFunction", @@ -49183,7 +50974,33 @@ "executionsMbSeconds", "buildsSuccess", "buildsFailed" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [] + } }, "usageSites": { "description": "UsageSites", @@ -49452,7 +51269,40 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "sitesTotal": 0, + "sites": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageSite": { "description": "UsageSite", @@ -49711,7 +51561,39 @@ "inbound", "outboundTotal", "outbound" - ] + ], + "example": { + "range": "30d", + "deploymentsTotal": 0, + "deploymentsStorageTotal": 0, + "buildsTotal": 0, + "buildsSuccessTotal": 0, + "buildsFailedTotal": 0, + "buildsStorageTotal": 0, + "buildsTimeTotal": 0, + "buildsTimeAverage": 0, + "buildsMbSecondsTotal": 0, + "executionsTotal": 0, + "executionsTimeTotal": 0, + "executionsMbSecondsTotal": 0, + "deployments": [], + "deploymentsStorage": [], + "builds": [], + "buildsStorage": [], + "buildsTime": [], + "buildsMbSeconds": [], + "executions": [], + "executionsTime": [], + "executionsMbSeconds": [], + "buildsSuccess": [], + "buildsFailed": [], + "requestsTotal": 0, + "requests": [], + "inboundTotal": 0, + "inbound": [], + "outboundTotal": 0, + "outbound": [] + } }, "usageProject": { "description": "UsageProject", @@ -49985,7 +51867,41 @@ "databasesWrites", "imageTransformations", "imageTransformationsTotal" - ] + ], + "example": { + "executionsTotal": 0, + "documentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "databasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "executionsBreakdown": [], + "bucketsBreakdown": [], + "databasesStorageBreakdown": [], + "executionsMbSecondsBreakdown": [], + "buildsMbSecondsBreakdown": [], + "functionsStorageBreakdown": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0 + } }, "headers": { "description": "Headers", @@ -50005,7 +51921,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -50039,7 +51959,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "proxyRule": { "description": "Rule", @@ -50138,7 +52064,24 @@ "status", "logs", "renewAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "function", + "status": "verified", + "logs": "HTTP challegne failed.", + "renewAt": "datetime" + } }, "smsTemplate": { "description": "SmsTemplate", @@ -50164,7 +52107,12 @@ "type", "locale", "message" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account." + } }, "emailTemplate": { "description": "EmailTemplate", @@ -50214,7 +52162,16 @@ "senderEmail", "replyTo", "subject" - ] + ], + "example": { + "type": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyTo": "emails@appwrite.io", + "subject": "Please verify your email address" + } }, "consoleVariables": { "description": "Console Variables", @@ -50308,7 +52265,23 @@ "_APP_DOMAIN_FUNCTIONS", "_APP_OPTIONS_FORCE_HTTPS", "_APP_DOMAINS_NAMESERVERS" - ] + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -50340,7 +52313,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -50360,7 +52339,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -50380,7 +52365,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -50412,7 +52401,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -50479,7 +52474,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -50590,7 +52600,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -50652,7 +52688,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -50727,7 +52773,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -50789,7 +52855,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } }, "migration": { "description": "Migration", @@ -50879,7 +52956,23 @@ "statusCounters", "resourceData", "errors" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "databaseId:collectionId", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [] + } }, "migrationReport": { "description": "Migration Report", @@ -50949,7 +53042,18 @@ "function", "size", "version" - ] + ], + "example": { + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "size": 30000, + "version": "1.4.0" + } } }, "externalDocs": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f929384a42..833c1a0612 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4209,7 +4209,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4224,12 +4224,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" }, "methods": [ { "name": "list", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4246,30 +4247,11 @@ } ], "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listDatabases" + "replaceWith": "tablesDb.list" } - }, - { - "name": "listDatabases", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4332,7 +4314,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4347,12 +4329,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" }, "methods": [ { "name": "create", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4360,7 +4343,8 @@ "parameters": [ "databaseId", "name", - "enabled" + "enabled", + "type" ], "required": [ "databaseId", @@ -4373,34 +4357,11 @@ } ], "description": "Create a new Database.\n", + "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatabase" + "replaceWith": "tablesDb.createDatabase" } - }, - { - "name": "createDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/database" - } - ], - "description": "Create a new Database.\n" } ], "auth": { @@ -4438,6 +4399,18 @@ "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", "default": true, "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] } }, "required": [ @@ -4473,7 +4446,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4488,12 +4461,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" }, "methods": [ { "name": "get", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4511,31 +4485,11 @@ } ], "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getDatabase" + "replaceWith": "tablesDb.get" } - }, - { - "name": "getDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4585,7 +4539,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4600,12 +4554,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" }, "methods": [ { "name": "update", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4626,34 +4581,11 @@ } ], "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatabase" + "replaceWith": "tablesDb.update" } - }, - { - "name": "updateDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 200, - "model": "#\/definitions\/database" - } - ], - "description": "Update a database by its unique ID." } ], "auth": { @@ -4722,7 +4654,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -4737,12 +4669,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" }, "methods": [ { "name": "delete", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -4759,30 +4692,11 @@ } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteDatabase" + "replaceWith": "tablesDb.delete" } - }, - { - "name": "deleteDatabase", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -4832,7 +4746,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -4847,7 +4761,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listTables" + "replaceWith": "tablesDb.listTables" }, "auth": { "Project": [], @@ -4917,7 +4831,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -4932,7 +4846,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createTable" + "replaceWith": "tablesDb.createTable" }, "auth": { "Project": [], @@ -5027,7 +4941,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5042,7 +4956,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getTable" + "replaceWith": "tablesDb.getTable" }, "auth": { "Project": [], @@ -5099,7 +5013,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5114,7 +5028,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateTable" + "replaceWith": "tablesDb.updateTable" }, "auth": { "Project": [], @@ -5205,7 +5119,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5220,7 +5134,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteTable" + "replaceWith": "tablesDb.deleteTable" }, "auth": { "Project": [], @@ -5277,7 +5191,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5292,7 +5206,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listColumns" + "replaceWith": "tablesDb.listColumns" }, "auth": { "Project": [], @@ -5363,7 +5277,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5378,7 +5292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createBooleanColumn" + "replaceWith": "tablesDb.createBooleanColumn" }, "auth": { "Project": [], @@ -5474,7 +5388,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5489,7 +5403,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateBooleanColumn" + "replaceWith": "tablesDb.updateBooleanColumn" }, "auth": { "Project": [], @@ -5587,7 +5501,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5602,7 +5516,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createDatetimeColumn" + "replaceWith": "tablesDb.createDatetimeColumn" }, "auth": { "Project": [], @@ -5698,7 +5612,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -5713,7 +5627,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateDatetimeColumn" + "replaceWith": "tablesDb.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5811,7 +5725,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -5826,7 +5740,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEmailColumn" + "replaceWith": "tablesDb.createEmailColumn" }, "auth": { "Project": [], @@ -5922,7 +5836,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -5937,7 +5851,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEmailColumn" + "replaceWith": "tablesDb.updateEmailColumn" }, "auth": { "Project": [], @@ -6035,7 +5949,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6050,7 +5964,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createEnumColumn" + "replaceWith": "tablesDb.createEnumColumn" }, "auth": { "Project": [], @@ -6156,7 +6070,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6171,7 +6085,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateEnumColumn" + "replaceWith": "tablesDb.updateEnumColumn" }, "auth": { "Project": [], @@ -6279,7 +6193,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6294,7 +6208,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createFloatColumn" + "replaceWith": "tablesDb.createFloatColumn" }, "auth": { "Project": [], @@ -6402,7 +6316,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6417,7 +6331,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateFloatColumn" + "replaceWith": "tablesDb.updateFloatColumn" }, "auth": { "Project": [], @@ -6527,7 +6441,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6542,7 +6456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIntegerColumn" + "replaceWith": "tablesDb.createIntegerColumn" }, "auth": { "Project": [], @@ -6650,7 +6564,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -6665,7 +6579,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIntegerColumn" + "replaceWith": "tablesDb.updateIntegerColumn" }, "auth": { "Project": [], @@ -6775,7 +6689,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -6790,7 +6704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIpColumn" + "replaceWith": "tablesDb.createIpColumn" }, "auth": { "Project": [], @@ -6886,7 +6800,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -6901,7 +6815,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateIpColumn" + "replaceWith": "tablesDb.updateIpColumn" }, "auth": { "Project": [], @@ -6999,7 +6913,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -7014,7 +6928,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRelationshipColumn" + "replaceWith": "tablesDb.createRelationshipColumn" }, "auth": { "Project": [], @@ -7137,7 +7051,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -7152,7 +7066,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createStringColumn" + "replaceWith": "tablesDb.createStringColumn" }, "auth": { "Project": [], @@ -7261,7 +7175,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -7276,7 +7190,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateStringColumn" + "replaceWith": "tablesDb.updateStringColumn" }, "auth": { "Project": [], @@ -7380,7 +7294,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -7395,7 +7309,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createUrlColumn" + "replaceWith": "tablesDb.createUrlColumn" }, "auth": { "Project": [], @@ -7491,7 +7405,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -7506,7 +7420,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateUrlColumn" + "replaceWith": "tablesDb.updateUrlColumn" }, "auth": { "Project": [], @@ -7633,7 +7547,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -7648,7 +7562,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getColumn" + "replaceWith": "tablesDb.getColumn" }, "auth": { "Project": [], @@ -7707,7 +7621,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -7722,7 +7636,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteColumn" + "replaceWith": "tablesDb.deleteColumn" }, "auth": { "Project": [], @@ -7788,7 +7702,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -7803,7 +7717,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRelationshipColumn" + "replaceWith": "tablesDb.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7895,7 +7809,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -7911,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listRows" + "replaceWith": "tablesDb.listRows" }, "auth": { "Project": [], @@ -7982,7 +7896,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -7998,12 +7912,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" }, "methods": [ { "name": "createDocument", "namespace": "databases", + "desc": "Create document", "auth": { "Project": [], "Session": [] @@ -8028,14 +7943,16 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRow" + "replaceWith": "tablesDb.createRow" } }, { "name": "createDocuments", "namespace": "databases", + "desc": "Create documents", "auth": { "Project": [], "Key": [] @@ -8056,10 +7973,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createRows" + "replaceWith": "tablesDb.createRows" } } ], @@ -8146,7 +8064,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8159,7 +8077,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -8175,12 +8093,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" }, "methods": [ { "name": "upsertDocuments", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Key": [] @@ -8201,10 +8120,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRows" + "replaceWith": "tablesDb.upsertRows" } } ], @@ -8271,7 +8191,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8284,7 +8204,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -8300,7 +8220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRows" + "replaceWith": "tablesDb.updateRows" }, "auth": { "Project": [], @@ -8368,7 +8288,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8381,7 +8301,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -8397,7 +8317,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRows" + "replaceWith": "tablesDb.deleteRows" }, "auth": { "Project": [], @@ -8472,7 +8392,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -8488,7 +8408,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getRow" + "replaceWith": "tablesDb.getRow" }, "auth": { "Project": [], @@ -8554,7 +8474,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8567,7 +8487,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -8583,12 +8503,13 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" }, "methods": [ { "name": "upsertDocument", "namespace": "databases", + "desc": "", "auth": { "Project": [], "Session": [] @@ -8612,10 +8533,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "grids.upsertRow" + "replaceWith": "tablesDb.upsertRow" } } ], @@ -8711,7 +8633,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -8727,7 +8649,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.updateRow" + "replaceWith": "tablesDb.updateRow" }, "auth": { "Project": [], @@ -8813,7 +8735,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -8829,7 +8751,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteRow" + "replaceWith": "tablesDb.deleteRow" }, "auth": { "Project": [], @@ -8898,7 +8820,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -8914,7 +8836,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.decrementRowColumn" + "replaceWith": "tablesDb.decrementRowColumn" }, "auth": { "Project": [], @@ -9009,7 +8931,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -9025,7 +8947,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.incrementRowColumn" + "replaceWith": "tablesDb.incrementRowColumn" }, "auth": { "Project": [], @@ -9118,7 +9040,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -9133,7 +9055,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.listIndexes" + "replaceWith": "tablesDb.listIndexes" }, "auth": { "Project": [], @@ -9202,7 +9124,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -9217,7 +9139,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.createIndex" + "replaceWith": "tablesDb.createIndex" }, "auth": { "Project": [], @@ -9334,7 +9256,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -9349,7 +9271,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.getIndex" + "replaceWith": "tablesDb.getIndex" }, "auth": { "Project": [], @@ -9408,7 +9330,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -9423,7 +9345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "grids.deleteIndex" + "replaceWith": "tablesDb.deleteIndex" }, "auth": { "Project": [], @@ -9463,4469 +9385,6 @@ ] } }, - "\/databases\/{databaseId}\/grids\/tables": { - "get": { - "summary": "List tables", - "operationId": "gridsListTables", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", - "responses": { - "200": { - "description": "Tables List", - "schema": { - "$ref": "#\/definitions\/tableList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTables", - "group": null, - "weight": 374, - "cookies": false, - "type": "", - "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "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: name, enabled, rowSecurity", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "", - "default": "", - "in": "query" - } - ] - }, - "post": { - "summary": "Create table", - "operationId": "gridsCreateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTable", - "group": null, - "weight": 370, - "cookies": false, - "type": "", - "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "tableId": { - "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "" - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "tableId", - "name" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "gridsGetTable", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTable", - "group": null, - "weight": 371, - "cookies": false, - "type": "", - "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - }, - "put": { - "summary": "Update table", - "operationId": "gridsUpdateTable", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a table by its unique ID.", - "responses": { - "200": { - "description": "Table", - "schema": { - "$ref": "#\/definitions\/table" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateTable", - "group": null, - "weight": 372, - "cookies": false, - "type": "", - "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "default": null, - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - ] - }, - "delete": { - "summary": "Delete table", - "operationId": "gridsDeleteTable", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTable", - "group": null, - "weight": 373, - "cookies": false, - "type": "", - "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "gridsListColumns", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List columns in the table.", - "responses": { - "200": { - "description": "Columns List", - "schema": { - "$ref": "#\/definitions\/columnList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listColumns", - "group": "columns", - "weight": 379, - "cookies": false, - "type": "", - "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table 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: key, type, size, required, array, status, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { - "post": { - "summary": "Create boolean column", - "operationId": "gridsCreateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a boolean column.\n", - "responses": { - "202": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBooleanColumn", - "group": "columns", - "weight": 380, - "cookies": false, - "type": "", - "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { - "patch": { - "summary": "Update boolean column", - "operationId": "gridsUpdateBooleanColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnBoolean", - "schema": { - "$ref": "#\/definitions\/columnBoolean" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBooleanColumn", - "group": "columns", - "weight": 381, - "cookies": false, - "type": "", - "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": false, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { - "post": { - "summary": "Create datetime column", - "operationId": "gridsCreateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a date time column according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatetimeColumn", - "group": "columns", - "weight": 382, - "cookies": false, - "type": "", - "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { - "patch": { - "summary": "Update dateTime column", - "operationId": "gridsUpdateDatetimeColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", - "responses": { - "200": { - "description": "ColumnDatetime", - "schema": { - "$ref": "#\/definitions\/columnDatetime" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatetimeColumn", - "group": "columns", - "weight": 383, - "cookies": false, - "type": "", - "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { - "post": { - "summary": "Create email column", - "operationId": "gridsCreateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an email column.\n", - "responses": { - "202": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEmailColumn", - "group": "columns", - "weight": 384, - "cookies": false, - "type": "", - "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { - "patch": { - "summary": "Update email column", - "operationId": "gridsUpdateEmailColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEmail", - "schema": { - "$ref": "#\/definitions\/columnEmail" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEmailColumn", - "group": "columns", - "weight": 385, - "cookies": false, - "type": "", - "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "email@example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { - "post": { - "summary": "Create enum column", - "operationId": "gridsCreateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", - "responses": { - "202": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createEnumColumn", - "group": "columns", - "weight": 386, - "cookies": false, - "type": "", - "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "elements", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { - "patch": { - "summary": "Update enum column", - "operationId": "gridsUpdateEnumColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnEnum", - "schema": { - "$ref": "#\/definitions\/columnEnum" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateEnumColumn", - "group": "columns", - "weight": 387, - "cookies": false, - "type": "", - "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { - "post": { - "summary": "Create float column", - "operationId": "gridsCreateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFloatColumn", - "group": "columns", - "weight": 388, - "cookies": false, - "type": "", - "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { - "patch": { - "summary": "Update float column", - "operationId": "gridsUpdateFloatColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnFloat", - "schema": { - "$ref": "#\/definitions\/columnFloat" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateFloatColumn", - "group": "columns", - "weight": 389, - "cookies": false, - "type": "", - "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { - "post": { - "summary": "Create integer column", - "operationId": "gridsCreateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIntegerColumn", - "group": "columns", - "weight": 390, - "cookies": false, - "type": "", - "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { - "patch": { - "summary": "Update integer column", - "operationId": "gridsUpdateIntegerColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnInteger", - "schema": { - "$ref": "#\/definitions\/columnInteger" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIntegerColumn", - "group": "columns", - "weight": 391, - "cookies": false, - "type": "", - "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "gridsCreateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create IP address column.\n", - "responses": { - "202": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIpColumn", - "group": "columns", - "weight": 392, - "cookies": false, - "type": "", - "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "gridsUpdateIpColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnIP", - "schema": { - "$ref": "#\/definitions\/columnIp" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateIpColumn", - "group": "columns", - "weight": 393, - "cookies": false, - "type": "", - "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "default": null, - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "gridsCreateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "202": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", - "weight": 394, - "cookies": false, - "type": "", - "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "default": null, - "x-example": "" - }, - "type": { - "type": "string", - "description": "Relation type", - "default": null, - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "default": null, - "x-example": null - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "gridsCreateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a string column.\n", - "responses": { - "202": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createStringColumn", - "group": "columns", - "weight": 396, - "cookies": false, - "type": "", - "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "size", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { - "patch": { - "summary": "Update string column", - "operationId": "gridsUpdateStringColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnString", - "schema": { - "$ref": "#\/definitions\/columnString" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", - "weight": 397, - "cookies": false, - "type": "", - "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "default": null, - "x-example": 1 - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "gridsCreateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a URL column.\n", - "responses": { - "202": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", - "weight": 398, - "cookies": false, - "type": "", - "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com" - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "gridsUpdateUrlColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", - "responses": { - "200": { - "description": "ColumnURL", - "schema": { - "$ref": "#\/definitions\/columnUrl" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", - "weight": 399, - "cookies": false, - "type": "", - "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "default": null, - "x-example": "https:\/\/example.com", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - }, - "required": [ - "required", - "default" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { - "get": { - "summary": "Get column", - "operationId": "gridsGetColumn", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get column by ID.", - "responses": { - "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", - "schema": { - "x-oneOf": [ - { - "$ref": "#\/definitions\/columnBoolean" - }, - { - "$ref": "#\/definitions\/columnInteger" - }, - { - "$ref": "#\/definitions\/columnFloat" - }, - { - "$ref": "#\/definitions\/columnEmail" - }, - { - "$ref": "#\/definitions\/columnEnum" - }, - { - "$ref": "#\/definitions\/columnUrl" - }, - { - "$ref": "#\/definitions\/columnIp" - }, - { - "$ref": "#\/definitions\/columnDatetime" - }, - { - "$ref": "#\/definitions\/columnRelationship" - }, - { - "$ref": "#\/definitions\/columnString" - } - ] - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getColumn", - "group": "columns", - "weight": 377, - "cookies": false, - "type": "", - "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete column", - "operationId": "gridsDeleteColumn", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Deletes a column.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteColumn", - "group": "columns", - "weight": 378, - "cookies": false, - "type": "", - "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "gridsUpdateRelationshipColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "schema": { - "$ref": "#\/definitions\/columnRelationship" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", - "weight": 395, - "cookies": false, - "type": "", - "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": null, - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [] - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "gridsListIndexes", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "List indexes in the table.", - "responses": { - "200": { - "description": "Column Indexes List", - "schema": { - "$ref": "#\/definitions\/columnIndexList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "weight": 403, - "cookies": false, - "type": "", - "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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: key, type, status, attributes, error", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create index", - "operationId": "gridsCreateIndex", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "weight": 400, - "cookies": false, - "type": "", - "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "IndexType", - "x-enum-keys": [] - }, - "columns": { - "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", - "default": null, - "x-example": null, - "items": { - "type": "string" - } - }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "columns" - ] - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "gridsGetIndex", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "schema": { - "$ref": "#\/definitions\/columnIndex" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "weight": 401, - "cookies": false, - "type": "", - "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "gridsDeleteIndex", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "weight": 402, - "cookies": false, - "type": "", - "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", - "platforms": [ - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "gridsListRows", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRows", - "group": "rows", - "weight": 412, - "cookies": false, - "type": "", - "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "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" - } - ] - }, - "post": { - "summary": "Create row", - "operationId": "gridsCreateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRow", - "group": "rows", - "weight": 404, - "cookies": false, - "type": "", - "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "createRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "" - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "rows": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - } - } - } - } - ] - }, - "put": { - "summary": "Create or update rows", - "operationId": "gridsUpsertRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", - "responses": { - "201": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRows", - "group": "rows", - "weight": 409, - "cookies": false, - "type": "", - "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRows", - "namespace": "grids", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" - } - ], - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "default": null, - "x-example": null, - "items": { - "type": "object" - } - } - }, - "required": [ - "rows" - ] - } - } - ] - }, - "patch": { - "summary": "Update rows", - "operationId": "gridsUpdateRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRows", - "group": "rows", - "weight": 407, - "cookies": false, - "type": "", - "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete rows", - "operationId": "gridsDeleteRows", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", - "responses": { - "200": { - "description": "Rows List", - "schema": { - "$ref": "#\/definitions\/rowList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRows", - "group": "rows", - "weight": 411, - "cookies": false, - "type": "", - "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "gridsGetRow", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getRow", - "group": "rows", - "weight": 405, - "cookies": false, - "type": "", - "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row 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" - } - ] - }, - "put": { - "summary": "Create or update a row", - "operationId": "gridsUpsertRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", - "responses": { - "201": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertRow", - "group": "rows", - "weight": 408, - "cookies": false, - "type": "", - "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "methods": [ - { - "name": "upsertRow", - "namespace": "grids", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - } - ], - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "patch": { - "summary": "Update row", - "operationId": "gridsUpdateRow", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateRow", - "group": "rows", - "weight": 406, - "cookies": false, - "type": "", - "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": null, - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete row", - "operationId": "gridsDeleteRow", - "consumes": [ - "application\/json" - ], - "produces": [], - "tags": [ - "grids" - ], - "description": "Delete a row by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRow", - "group": "rows", - "weight": 410, - "cookies": false, - "type": "", - "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "client", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "gridsDecrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Decrement a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "weight": 415, - "cookies": false, - "type": "", - "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, - "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "gridsIncrementRowColumn", - "consumes": [ - "application\/json" - ], - "produces": [ - "application\/json" - ], - "tags": [ - "grids" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "schema": { - "$ref": "#\/definitions\/row" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "weight": 414, - "cookies": false, - "type": "", - "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "type": "string", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "default": null, - "x-example": null - } - } - } - } - ] - } - }, "\/functions": { "get": { "summary": "List functions", @@ -13950,7 +9409,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 424, + "weight": 432, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -14023,7 +9482,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 421, + "weight": 429, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -14275,7 +9734,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 426, + "weight": 434, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -14325,7 +9784,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 427, + "weight": 435, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -14376,7 +9835,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 422, + "weight": 430, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -14436,7 +9895,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 423, + "weight": 431, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -14684,7 +10143,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 425, + "weight": 433, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -14746,7 +10205,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 430, + "weight": 438, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -14824,7 +10283,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 431, + "weight": 439, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -14905,7 +10364,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 428, + "weight": 436, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -14998,7 +10457,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 436, + "weight": 444, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -15084,7 +10543,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 433, + "weight": 441, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -15191,7 +10650,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 434, + "weight": 442, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -15288,7 +10747,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 429, + "weight": 437, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -15351,7 +10810,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 432, + "weight": 440, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -15419,7 +10878,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 435, + "weight": 443, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -15505,7 +10964,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 437, + "weight": 445, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -15573,7 +11032,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 440, + "weight": 448, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -15648,7 +11107,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 438, + "weight": 446, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -15766,7 +11225,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 439, + "weight": 447, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -15832,7 +11291,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 441, + "weight": 449, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -15900,7 +11359,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 446, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -15960,7 +11419,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 444, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -16051,7 +11510,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 445, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -16119,7 +11578,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 447, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -16212,7 +11671,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 448, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -16282,7 +11741,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 254, + "weight": 255, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -16357,7 +11816,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 253, + "weight": 254, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -18139,7 +13598,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -18215,7 +13674,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -18374,7 +13833,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -18530,7 +13989,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -18726,7 +14185,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -18921,7 +14380,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -19040,7 +14499,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -19155,7 +14614,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -19211,7 +14670,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -19272,7 +14731,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -19345,7 +14804,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -19418,7 +14877,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -19494,7 +14953,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -19610,7 +15069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -19724,7 +15183,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -19816,7 +15275,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -19906,7 +15365,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -20034,7 +15493,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -20160,7 +15619,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "demo": "messaging\/create-msg91provider.md", @@ -20264,7 +15723,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/update-msg91provider.md", @@ -20366,7 +15825,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -20482,7 +15941,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -20596,7 +16055,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -20756,7 +16215,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -20913,7 +16372,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -21017,7 +16476,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -21119,7 +16578,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -21223,7 +16682,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -21325,7 +16784,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -21429,7 +16888,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -21531,7 +16990,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 277, + "weight": 278, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -21635,7 +17094,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -21735,7 +17194,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -21791,7 +17250,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -21852,7 +17311,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -21925,7 +17384,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -21998,7 +17457,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -22072,7 +17531,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -22161,7 +17620,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 297, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -22222,7 +17681,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -22302,7 +17761,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -22363,7 +17822,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -22436,7 +17895,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -22518,7 +17977,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 300, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -22607,7 +18066,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -22671,7 +18130,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -22743,7 +18202,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 453, + "weight": 461, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -22816,7 +18275,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 451, + "weight": 459, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -23084,7 +18543,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 456, + "weight": 464, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -23134,7 +18593,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 479, + "weight": 487, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -23185,7 +18644,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 452, + "weight": 460, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -23245,7 +18704,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 454, + "weight": 462, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -23508,7 +18967,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 455, + "weight": 463, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -23570,7 +19029,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 462, + "weight": 470, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -23648,7 +19107,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 461, + "weight": 469, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -23729,7 +19188,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 457, + "weight": 465, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -23830,7 +19289,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 465, + "weight": 473, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -23910,7 +19369,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 458, + "weight": 466, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -24017,7 +19476,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 459, + "weight": 467, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -24115,7 +19574,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 460, + "weight": 468, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -24178,7 +19637,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 463, + "weight": 471, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -24246,7 +19705,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 464, + "weight": 472, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -24332,7 +19791,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 466, + "weight": 474, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -24400,7 +19859,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 468, + "weight": 476, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -24472,7 +19931,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 467, + "weight": 475, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -24537,7 +19996,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 469, + "weight": 477, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -24605,7 +20064,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 472, + "weight": 480, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -24665,7 +20124,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 470, + "weight": 478, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -24756,7 +20215,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 471, + "weight": 479, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -24824,7 +20283,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 473, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -24917,7 +20376,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 474, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -26201,6 +21660,4844 @@ ] } }, + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDbList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Databases List", + "schema": { + "$ref": "#\/definitions\/databaseList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "tablesdb", + "weight": 375, + "cookies": false, + "type": "", + "demo": "tables-db\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "tablesDbCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "tablesdb", + "weight": 371, + "cookies": false, + "type": "", + "demo": "tables-db\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "default": "tablesdb", + "x-example": "tablesdb", + "enum": [ + "tablesdb", + "legacy" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "tablesDbGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "tablesdb", + "weight": 372, + "cookies": false, + "type": "", + "demo": "tables-db\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "tablesDbUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "schema": { + "$ref": "#\/definitions\/database" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tablesdb", + "weight": 373, + "cookies": false, + "type": "", + "demo": "tables-db\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete database", + "operationId": "tablesDbDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "weight": 374, + "cookies": false, + "type": "", + "demo": "tables-db\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesDbListTables", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTables", + "group": null, + "weight": 382, + "cookies": false, + "type": "", + "demo": "tables-db\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesDbCreateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTable", + "group": null, + "weight": 378, + "cookies": false, + "type": "", + "demo": "tables-db\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesDbGetTable", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTable", + "group": null, + "weight": 379, + "cookies": false, + "type": "", + "demo": "tables-db\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesDbUpdateTable", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTable", + "group": null, + "weight": 380, + "cookies": false, + "type": "", + "demo": "tables-db\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDbDeleteTable", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTable", + "group": null, + "weight": 381, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesDbListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List columns in the table.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "demo": "tables-db\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table 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: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDbCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "demo": "tables-db\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDbUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "demo": "tables-db\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDbCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "demo": "tables-db\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesDbUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "demo": "tables-db\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesDbCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "demo": "tables-db\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDbUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "demo": "tables-db\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDbCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "demo": "tables-db\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDbUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "demo": "tables-db\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesDbCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "demo": "tables-db\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDbUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "demo": "tables-db\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDbCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "demo": "tables-db\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDbUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "demo": "tables-db\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDbCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "demo": "tables-db\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDbUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 401, + "cookies": false, + "type": "", + "demo": "tables-db\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesDbCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 402, + "cookies": false, + "type": "", + "demo": "tables-db\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDbCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 404, + "cookies": false, + "type": "", + "demo": "tables-db\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesDbUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 405, + "cookies": false, + "type": "", + "demo": "tables-db\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesDbCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 406, + "cookies": false, + "type": "", + "demo": "tables-db\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesDbUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 407, + "cookies": false, + "type": "", + "demo": "tables-db\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDbGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "demo": "tables-db\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDbDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDbUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 403, + "cookies": false, + "type": "", + "demo": "tables-db\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDbListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 411, + "cookies": false, + "type": "", + "demo": "tables-db\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesDbCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 408, + "cookies": false, + "type": "", + "demo": "tables-db\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "IndexType", + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDbGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 409, + "cookies": false, + "type": "", + "demo": "tables-db\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDbDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 410, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tables.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDbListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 420, + "cookies": false, + "type": "", + "demo": "tables-db\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "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" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDbCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "demo": "tables-db\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "namespace": "tablesDb", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-row.md" + }, + { + "name": "createRows", + "namespace": "tablesDb", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/create-rows.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesDbUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 417, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "demo": "tables-db\/upsert-rows.md" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDbUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "demo": "tables-db\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDbDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 419, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDbGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "demo": "tables-db\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row 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" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesDbUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "demo": "tables-db\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDb", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "demo": "tables-db\/upsert-row.md" + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDbUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 414, + "cookies": false, + "type": "", + "demo": "tables-db\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDbDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tablesDb" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 418, + "cookies": false, + "type": "", + "demo": "tables-db\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDbDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 423, + "cookies": false, + "type": "", + "demo": "tables-db\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDbIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tablesDb" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 422, + "cookies": false, + "type": "", + "demo": "tables-db\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "rows.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/teams": { "get": { "summary": "List teams", @@ -27260,7 +27557,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 487, + "weight": 495, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -27341,7 +27638,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 485, + "weight": 493, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -27426,7 +27723,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 486, + "weight": 494, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -27487,7 +27784,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 488, + "weight": 496, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -27559,7 +27856,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 489, + "weight": 497, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30888,8 +31185,8 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tables", - "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + "name": "tablesdb", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { "name": "locale", @@ -30952,7 +31249,8 @@ "any": { "description": "Any", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": [] }, "rowList": { "description": "Rows List", @@ -30977,7 +31275,11 @@ "required": [ "total", "rows" - ] + ], + "example": { + "total": 5, + "rows": "" + } }, "documentList": { "description": "Documents List", @@ -31002,7 +31304,11 @@ "required": [ "total", "documents" - ] + ], + "example": { + "total": 5, + "documents": "" + } }, "tableList": { "description": "Tables List", @@ -31027,7 +31333,11 @@ "required": [ "total", "tables" - ] + ], + "example": { + "total": 5, + "tables": "" + } }, "collectionList": { "description": "Collections List", @@ -31052,7 +31362,11 @@ "required": [ "total", "collections" - ] + ], + "example": { + "total": 5, + "collections": "" + } }, "databaseList": { "description": "Databases List", @@ -31077,7 +31391,11 @@ "required": [ "total", "databases" - ] + ], + "example": { + "total": 5, + "databases": "" + } }, "indexList": { "description": "Indexes List", @@ -31102,7 +31420,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "columnIndexList": { "description": "Column Indexes List", @@ -31127,7 +31449,11 @@ "required": [ "total", "indexes" - ] + ], + "example": { + "total": 5, + "indexes": "" + } }, "userList": { "description": "Users List", @@ -31152,7 +31478,11 @@ "required": [ "total", "users" - ] + ], + "example": { + "total": 5, + "users": "" + } }, "sessionList": { "description": "Sessions List", @@ -31177,7 +31507,11 @@ "required": [ "total", "sessions" - ] + ], + "example": { + "total": 5, + "sessions": "" + } }, "identityList": { "description": "Identities List", @@ -31202,7 +31536,11 @@ "required": [ "total", "identities" - ] + ], + "example": { + "total": 5, + "identities": "" + } }, "logList": { "description": "Logs List", @@ -31227,7 +31565,11 @@ "required": [ "total", "logs" - ] + ], + "example": { + "total": 5, + "logs": "" + } }, "fileList": { "description": "Files List", @@ -31252,7 +31594,11 @@ "required": [ "total", "files" - ] + ], + "example": { + "total": 5, + "files": "" + } }, "bucketList": { "description": "Buckets List", @@ -31277,7 +31623,11 @@ "required": [ "total", "buckets" - ] + ], + "example": { + "total": 5, + "buckets": "" + } }, "resourceTokenList": { "description": "Resource Tokens List", @@ -31302,7 +31652,11 @@ "required": [ "total", "tokens" - ] + ], + "example": { + "total": 5, + "tokens": "" + } }, "teamList": { "description": "Teams List", @@ -31327,7 +31681,11 @@ "required": [ "total", "teams" - ] + ], + "example": { + "total": 5, + "teams": "" + } }, "membershipList": { "description": "Memberships List", @@ -31352,7 +31710,11 @@ "required": [ "total", "memberships" - ] + ], + "example": { + "total": 5, + "memberships": "" + } }, "siteList": { "description": "Sites List", @@ -31377,7 +31739,11 @@ "required": [ "total", "sites" - ] + ], + "example": { + "total": 5, + "sites": "" + } }, "functionList": { "description": "Functions List", @@ -31402,7 +31768,11 @@ "required": [ "total", "functions" - ] + ], + "example": { + "total": 5, + "functions": "" + } }, "frameworkList": { "description": "Frameworks List", @@ -31427,7 +31797,11 @@ "required": [ "total", "frameworks" - ] + ], + "example": { + "total": 5, + "frameworks": "" + } }, "runtimeList": { "description": "Runtimes List", @@ -31452,7 +31826,11 @@ "required": [ "total", "runtimes" - ] + ], + "example": { + "total": 5, + "runtimes": "" + } }, "deploymentList": { "description": "Deployments List", @@ -31477,7 +31855,11 @@ "required": [ "total", "deployments" - ] + ], + "example": { + "total": 5, + "deployments": "" + } }, "executionList": { "description": "Executions List", @@ -31502,7 +31884,11 @@ "required": [ "total", "executions" - ] + ], + "example": { + "total": 5, + "executions": "" + } }, "countryList": { "description": "Countries List", @@ -31527,7 +31913,11 @@ "required": [ "total", "countries" - ] + ], + "example": { + "total": 5, + "countries": "" + } }, "continentList": { "description": "Continents List", @@ -31552,7 +31942,11 @@ "required": [ "total", "continents" - ] + ], + "example": { + "total": 5, + "continents": "" + } }, "languageList": { "description": "Languages List", @@ -31577,7 +31971,11 @@ "required": [ "total", "languages" - ] + ], + "example": { + "total": 5, + "languages": "" + } }, "currencyList": { "description": "Currencies List", @@ -31602,7 +32000,11 @@ "required": [ "total", "currencies" - ] + ], + "example": { + "total": 5, + "currencies": "" + } }, "phoneList": { "description": "Phones List", @@ -31627,7 +32029,11 @@ "required": [ "total", "phones" - ] + ], + "example": { + "total": 5, + "phones": "" + } }, "variableList": { "description": "Variables List", @@ -31652,7 +32058,11 @@ "required": [ "total", "variables" - ] + ], + "example": { + "total": 5, + "variables": "" + } }, "localeCodeList": { "description": "Locale codes list", @@ -31677,7 +32087,11 @@ "required": [ "total", "localeCodes" - ] + ], + "example": { + "total": 5, + "localeCodes": "" + } }, "providerList": { "description": "Provider list", @@ -31702,7 +32116,11 @@ "required": [ "total", "providers" - ] + ], + "example": { + "total": 5, + "providers": "" + } }, "messageList": { "description": "Message list", @@ -31727,7 +32145,11 @@ "required": [ "total", "messages" - ] + ], + "example": { + "total": 5, + "messages": "" + } }, "topicList": { "description": "Topic list", @@ -31752,7 +32174,11 @@ "required": [ "total", "topics" - ] + ], + "example": { + "total": 5, + "topics": "" + } }, "subscriberList": { "description": "Subscriber list", @@ -31777,7 +32203,11 @@ "required": [ "total", "subscribers" - ] + ], + "example": { + "total": 5, + "subscribers": "" + } }, "targetList": { "description": "Target list", @@ -31802,7 +32232,11 @@ "required": [ "total", "targets" - ] + ], + "example": { + "total": 5, + "targets": "" + } }, "specificationList": { "description": "Specifications List", @@ -31827,7 +32261,11 @@ "required": [ "total", "specifications" - ] + ], + "example": { + "total": 5, + "specifications": "" + } }, "database": { "description": "Database", @@ -31857,6 +32295,11 @@ "type": "boolean", "description": "If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys.", "x-example": false + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy" } }, "required": [ @@ -31864,8 +32307,17 @@ "name", "$createdAt", "$updatedAt", - "enabled" - ] + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy" + } }, "collection": { "description": "Collection", @@ -31976,7 +32428,21 @@ "documentSecurity", "attributes", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {} + } }, "attributeList": { "description": "Attributes List", @@ -32031,7 +32497,11 @@ "required": [ "total", "attributes" - ] + ], + "example": { + "total": 5, + "attributes": "" + } }, "attributeString": { "description": "AttributeString", @@ -32106,7 +32576,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "attributeInteger": { "description": "AttributeInteger", @@ -32183,7 +32666,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "attributeFloat": { "description": "AttributeFloat", @@ -32260,7 +32756,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "attributeBoolean": { "description": "AttributeBoolean", @@ -32322,7 +32831,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "attributeEmail": { "description": "AttributeEmail", @@ -32390,7 +32910,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "attributeEnum": { "description": "AttributeEnum", @@ -32467,7 +32999,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "attributeIp": { "description": "AttributeIP", @@ -32535,7 +33080,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "attributeUrl": { "description": "AttributeURL", @@ -32603,7 +33160,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" + } }, "attributeDatetime": { "description": "AttributeDatetime", @@ -32671,7 +33240,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "attributeRelationship": { "description": "AttributeRelationship", @@ -32763,7 +33344,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "table": { "description": "Table", @@ -32874,7 +33471,21 @@ "rowSecurity", "columns", "indexes" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {} + } }, "columnList": { "description": "Columns List", @@ -32929,7 +33540,11 @@ "required": [ "total", "columns" - ] + ], + "example": { + "total": 5, + "columns": "" + } }, "columnString": { "description": "ColumnString", @@ -33004,7 +33619,20 @@ "$createdAt", "$updatedAt", "size" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false + } }, "columnInteger": { "description": "ColumnInteger", @@ -33081,7 +33709,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 + } }, "columnFloat": { "description": "ColumnFloat", @@ -33158,7 +33799,20 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 + } }, "columnBoolean": { "description": "ColumnBoolean", @@ -33220,7 +33874,18 @@ "required", "$createdAt", "$updatedAt" - ] + ], + "example": { + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false + } }, "columnEmail": { "description": "ColumnEmail", @@ -33288,7 +33953,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" + } }, "columnEnum": { "description": "ColumnEnum", @@ -33365,7 +34042,20 @@ "$updatedAt", "elements", "format" - ] + ], + "example": { + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" + } }, "columnIp": { "description": "ColumnIP", @@ -33433,7 +34123,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" + } }, "columnUrl": { "description": "ColumnURL", @@ -33501,7 +34203,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" + } }, "columnDatetime": { "description": "ColumnDatetime", @@ -33569,7 +34283,19 @@ "$createdAt", "$updatedAt", "format" - ] + ], + "example": { + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" + } }, "columnRelationship": { "description": "ColumnRelationship", @@ -33661,7 +34387,23 @@ "twoWayKey", "onDelete", "side" - ] + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" + } }, "index": { "description": "Index", @@ -33739,7 +34481,19 @@ "error", "attributes", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] + } }, "columnIndex": { "description": "Index", @@ -33817,7 +34571,19 @@ "error", "columns", "lengths" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] + } }, "row": { "description": "Row", @@ -33874,7 +34640,18 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } }, "document": { "description": "Document", @@ -33934,7 +34711,23 @@ "$createdAt", "$updatedAt", "$permissions" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": 1, + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } }, "log": { "description": "Log", @@ -34068,7 +34861,30 @@ "deviceModel", "countryCode", "countryName" - ] + ], + "example": { + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" + } }, "user": { "description": "User", @@ -34231,7 +35047,33 @@ "prefs", "targets", "accessedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "algoMd5": { "description": "AlgoMD5", @@ -34245,7 +35087,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "md5" + } }, "algoSha": { "description": "AlgoSHA", @@ -34259,7 +35104,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "sha" + } }, "algoPhpass": { "description": "AlgoPHPass", @@ -34273,7 +35121,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "phpass" + } }, "algoBcrypt": { "description": "AlgoBcrypt", @@ -34287,7 +35138,10 @@ }, "required": [ "type" - ] + ], + "example": { + "type": "bcrypt" + } }, "algoScrypt": { "description": "AlgoScrypt", @@ -34329,7 +35183,14 @@ "costMemory", "costParallel", "length" - ] + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } }, "algoScryptModified": { "description": "AlgoScryptModified", @@ -34361,7 +35222,13 @@ "salt", "saltSeparator", "signerKey" - ] + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } }, "algoArgon2": { "description": "AlgoArgon2", @@ -34396,12 +35263,23 @@ "memoryCost", "timeCost", "threads" - ] + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } }, "preferences": { "description": "Preferences", "type": "object", - "additionalProperties": true + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } }, "session": { "description": "Session", @@ -34588,7 +35466,40 @@ "factors", "secret", "mfaUpdatedAt" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + } }, "identity": { "description": "Identity", @@ -34656,7 +35567,19 @@ "providerAccessToken", "providerAccessTokenExpiry", "providerRefreshToken" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + } }, "token": { "description": "Token", @@ -34700,7 +35623,15 @@ "secret", "expire", "phrase" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" + } }, "jwt": { "description": "JWT", @@ -34714,7 +35645,10 @@ }, "required": [ "jwt" - ] + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } }, "locale": { "description": "Locale", @@ -34764,7 +35698,16 @@ "continent", "eu", "currency" - ] + ], + "example": { + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD" + } }, "localeCode": { "description": "LocaleCode", @@ -34784,7 +35727,11 @@ "required": [ "code", "name" - ] + ], + "example": { + "code": "en-us", + "name": "US" + } }, "file": { "description": "File", @@ -34866,7 +35813,22 @@ "sizeOriginal", "chunksTotal", "chunksUploaded" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "chunksTotal": 17890, + "chunksUploaded": 17890 + } }, "bucket": { "description": "Bucket", @@ -34958,7 +35920,26 @@ "compression", "encryption", "antivirus" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "fileSecurity": true, + "name": "Documents", + "enabled": false, + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false + } }, "resourceToken": { "description": "ResourceToken", @@ -35008,7 +35989,16 @@ "expire", "secret", "accessedAt" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } }, "team": { "description": "Team", @@ -35060,7 +36050,18 @@ "name", "total", "prefs" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } + } }, "membership": { "description": "Membership", @@ -35151,7 +36152,24 @@ "confirm", "mfa", "roles" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "roles": [ + "owner" + ] + } }, "site": { "description": "Site", @@ -35338,7 +36356,38 @@ "buildRuntime", "adapter", "fallbackFile" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" + } }, "function": { "description": "Function", @@ -35528,7 +36577,37 @@ "providerRootDirectory", "providerSilentMode", "specification" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "specification": "s-1vcpu-512mb" + } }, "runtime": { "description": "Runtime", @@ -35587,7 +36666,17 @@ "image", "logo", "supports" - ] + ], + "example": { + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" + } }, "framework": { "description": "Framework", @@ -35643,7 +36732,25 @@ "buildRuntime", "runtimes", "adapters" - ] + ], + "example": { + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] + } }, "frameworkAdapter": { "description": "Framework Adapter", @@ -35681,7 +36788,14 @@ "buildCommand", "outputDirectory", "fallbackFile" - ] + ], + "example": { + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" + } }, "deployment": { "description": "Deployment", @@ -35855,7 +36969,36 @@ "providerCommitMessage", "providerCommitUrl", "providerBranchUrl" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerBranch": "0.7.x", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + } }, "execution": { "description": "Execution", @@ -35988,7 +37131,36 @@ "logs", "errors", "duration" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" + } }, "variable": { "description": "Variable", @@ -36044,7 +37216,17 @@ "secret", "resourceType", "resourceId" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" + } }, "country": { "description": "Country", @@ -36064,7 +37246,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "United States", + "code": "US" + } }, "continent": { "description": "Continent", @@ -36084,7 +37270,11 @@ "required": [ "name", "code" - ] + ], + "example": { + "name": "Europe", + "code": "EU" + } }, "language": { "description": "Language", @@ -36110,7 +37300,12 @@ "name", "code", "nativeName" - ] + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } }, "currency": { "description": "Currency", @@ -36162,7 +37357,16 @@ "rounding", "code", "namePlural" - ] + ], + "example": { + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" + } }, "phone": { "description": "Phone", @@ -36188,7 +37392,12 @@ "code", "countryCode", "countryName" - ] + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } }, "healthAntivirus": { "description": "Health Antivirus", @@ -36208,7 +37417,11 @@ "required": [ "version", "status" - ] + ], + "example": { + "version": "1.0.0", + "status": "online" + } }, "healthQueue": { "description": "Health Queue", @@ -36223,7 +37436,10 @@ }, "required": [ "size" - ] + ], + "example": { + "size": 8 + } }, "healthStatus": { "description": "Health Status", @@ -36250,7 +37466,12 @@ "name", "ping", "status" - ] + ], + "example": { + "name": "database", + "ping": 128, + "status": "pass" + } }, "healthCertificate": { "description": "Health Certificate", @@ -36294,7 +37515,15 @@ "validFrom", "validTo", "signatureTypeSN" - ] + ], + "example": { + "name": "\/CN=www.google.com", + "subjectSN": "", + "issuerOrganisation": "", + "validFrom": "1704200998", + "validTo": "1711458597", + "signatureTypeSN": "RSA-SHA256" + } }, "healthTime": { "description": "Health Time", @@ -36323,7 +37552,12 @@ "remoteTime", "localTime", "diff" - ] + ], + "example": { + "remoteTime": 1639490751, + "localTime": 1639490844, + "diff": 93 + } }, "headers": { "description": "Headers", @@ -36343,7 +37577,11 @@ "required": [ "name", "value" - ] + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } }, "specification": { "description": "Specification", @@ -36377,7 +37615,13 @@ "cpus", "enabled", "slug" - ] + ], + "example": { + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" + } }, "mfaChallenge": { "description": "MFA Challenge", @@ -36409,7 +37653,13 @@ "$createdAt", "userId", "expire" - ] + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } }, "mfaRecoveryCodes": { "description": "MFA Recovery Codes", @@ -36429,7 +37679,13 @@ }, "required": [ "recoveryCodes" - ] + ], + "example": { + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] + } }, "mfaType": { "description": "MFAType", @@ -36449,7 +37705,11 @@ "required": [ "secret", "uri" - ] + ], + "example": { + "secret": true, + "uri": true + } }, "mfaFactors": { "description": "MFAFactors", @@ -36481,7 +37741,13 @@ "phone", "email", "recoveryCode" - ] + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } }, "provider": { "description": "Provider", @@ -36548,7 +37814,22 @@ "enabled", "type", "credentials" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } + } }, "message": { "description": "Message", @@ -36659,7 +37940,33 @@ "deliveredTotal", "data", "status" - ] + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed." + } }, "topic": { "description": "Topic", @@ -36721,7 +38028,17 @@ "smsTotal", "pushTotal", "subscribe" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } }, "subscriber": { "description": "Subscriber", @@ -36796,7 +38113,27 @@ "userName", "topicId", "providerType" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } }, "target": { "description": "Target", @@ -36858,7 +38195,18 @@ "providerType", "identifier", "expired" - ] + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } } }, "externalDocs": { diff --git a/composer.json b/composer.json index 0c662c775f..c507a29922 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "utopia-php/domains": "0.8.*", "utopia-php/dns": "0.3.*", "utopia-php/dsn": "0.2.1", - "utopia-php/framework": "0.33.*", + "utopia-php/framework": "0.33.20", "utopia-php/fetch": "0.4.*", "utopia-php/image": "0.8.*", "utopia-php/locale": "0.8.*", diff --git a/composer.lock b/composer.lock index 4321d88110..050b5342c0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0da713ee5642eba1d30bc51c1a04a723", + "content-hash": "e8689d5f2082658847ddcb686d544842", "packages": [ { "name": "adhocore/jwt", @@ -4922,16 +4922,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.29", + "version": "0.41.30", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f" + "reference": "14a6e52d0d1075d176f4c80cafde9afe506e7455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4af563f3b0879747efc8434eb8ed8bf97e75039f", - "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/14a6e52d0d1075d176f4c80cafde9afe506e7455", + "reference": "14a6e52d0d1075d176f4c80cafde9afe506e7455", "shasum": "" }, "require": { @@ -4967,9 +4967,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.29" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.30" }, - "time": "2025-08-04T04:34:45+00:00" + "time": "2025-08-18T01:39:09+00:00" }, { "name": "doctrine/annotations", @@ -8407,7 +8407,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -8431,5 +8431,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/references/grids/create-boolean-column.md b/docs/references/grids/create-boolean-column.md deleted file mode 100644 index c528ede1a2..0000000000 --- a/docs/references/grids/create-boolean-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a boolean column. diff --git a/docs/references/grids/create-datetime-column.md b/docs/references/grids/create-datetime-column.md deleted file mode 100644 index ad92750639..0000000000 --- a/docs/references/grids/create-datetime-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/grids/create-email-column.md b/docs/references/grids/create-email-column.md deleted file mode 100644 index 91aa5c9326..0000000000 --- a/docs/references/grids/create-email-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an email column. diff --git a/docs/references/grids/create-enum-column.md b/docs/references/grids/create-enum-column.md deleted file mode 100644 index b9e5a3ebe4..0000000000 --- a/docs/references/grids/create-enum-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/grids/create-float-column.md b/docs/references/grids/create-float-column.md deleted file mode 100644 index 0b133eef28..0000000000 --- a/docs/references/grids/create-float-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-integer-column.md b/docs/references/grids/create-integer-column.md deleted file mode 100644 index 5f51b3965a..0000000000 --- a/docs/references/grids/create-integer-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-ip-column.md b/docs/references/grids/create-ip-column.md deleted file mode 100644 index 012431dbae..0000000000 --- a/docs/references/grids/create-ip-column.md +++ /dev/null @@ -1 +0,0 @@ -Create IP address column. diff --git a/docs/references/grids/create-relationship-column.md b/docs/references/grids/create-relationship-column.md deleted file mode 100644 index d87d8bccf8..0000000000 --- a/docs/references/grids/create-relationship-column.md +++ /dev/null @@ -1 +0,0 @@ -Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/create-row.md b/docs/references/grids/create-row.md deleted file mode 100644 index a07abfa04d..0000000000 --- a/docs/references/grids/create-row.md +++ /dev/null @@ -1 +0,0 @@ -Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-rows.md b/docs/references/grids/create-rows.md deleted file mode 100644 index cea67913b4..0000000000 --- a/docs/references/grids/create-rows.md +++ /dev/null @@ -1 +0,0 @@ -Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-string-column.md b/docs/references/grids/create-string-column.md deleted file mode 100644 index 7395e26a11..0000000000 --- a/docs/references/grids/create-string-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a string column. diff --git a/docs/references/grids/create-table.md b/docs/references/grids/create-table.md deleted file mode 100644 index 263638ea00..0000000000 --- a/docs/references/grids/create-table.md +++ /dev/null @@ -1 +0,0 @@ -Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-url-column.md b/docs/references/grids/create-url-column.md deleted file mode 100644 index e731d758ce..0000000000 --- a/docs/references/grids/create-url-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a URL column. diff --git a/docs/references/grids/decrement-row-column.md b/docs/references/grids/decrement-row-column.md deleted file mode 100644 index b7b32d6148..0000000000 --- a/docs/references/grids/decrement-row-column.md +++ /dev/null @@ -1 +0,0 @@ -Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/delete-column.md b/docs/references/grids/delete-column.md deleted file mode 100644 index efba8b1d77..0000000000 --- a/docs/references/grids/delete-column.md +++ /dev/null @@ -1 +0,0 @@ -Deletes a column. \ No newline at end of file diff --git a/docs/references/grids/delete-row.md b/docs/references/grids/delete-row.md deleted file mode 100644 index c0b9dfbdaf..0000000000 --- a/docs/references/grids/delete-row.md +++ /dev/null @@ -1 +0,0 @@ -Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/delete-rows.md b/docs/references/grids/delete-rows.md deleted file mode 100644 index 9d5189ce76..0000000000 --- a/docs/references/grids/delete-rows.md +++ /dev/null @@ -1 +0,0 @@ -Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/grids/delete-table.md b/docs/references/grids/delete-table.md deleted file mode 100644 index ad74ca3233..0000000000 --- a/docs/references/grids/delete-table.md +++ /dev/null @@ -1 +0,0 @@ -Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/grids/get-column.md b/docs/references/grids/get-column.md deleted file mode 100644 index cd8b8797a9..0000000000 --- a/docs/references/grids/get-column.md +++ /dev/null @@ -1 +0,0 @@ -Get column by ID. \ No newline at end of file diff --git a/docs/references/grids/get-database-usage.md b/docs/references/grids/get-database-usage.md deleted file mode 100644 index d9298f4814..0000000000 --- a/docs/references/grids/get-database-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-row-logs.md b/docs/references/grids/get-row-logs.md deleted file mode 100644 index 1d494ed53e..0000000000 --- a/docs/references/grids/get-row-logs.md +++ /dev/null @@ -1 +0,0 @@ -Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-row.md b/docs/references/grids/get-row.md deleted file mode 100644 index 6a30fa472c..0000000000 --- a/docs/references/grids/get-row.md +++ /dev/null @@ -1 +0,0 @@ -Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/grids/get-table-logs.md b/docs/references/grids/get-table-logs.md deleted file mode 100644 index 8b00c7f317..0000000000 --- a/docs/references/grids/get-table-logs.md +++ /dev/null @@ -1 +0,0 @@ -Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-table-usage.md b/docs/references/grids/get-table-usage.md deleted file mode 100644 index 08e28af0a6..0000000000 --- a/docs/references/grids/get-table-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-table.md b/docs/references/grids/get-table.md deleted file mode 100644 index 67b8428431..0000000000 --- a/docs/references/grids/get-table.md +++ /dev/null @@ -1 +0,0 @@ -Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/grids/increment-row-column.md b/docs/references/grids/increment-row-column.md deleted file mode 100644 index 7a19b3fbc7..0000000000 --- a/docs/references/grids/increment-row-column.md +++ /dev/null @@ -1 +0,0 @@ -Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/list-columns.md b/docs/references/grids/list-columns.md deleted file mode 100644 index aacf373082..0000000000 --- a/docs/references/grids/list-columns.md +++ /dev/null @@ -1 +0,0 @@ -List columns in the table. \ No newline at end of file diff --git a/docs/references/grids/list-indexes.md b/docs/references/grids/list-indexes.md deleted file mode 100644 index a0c7b2f861..0000000000 --- a/docs/references/grids/list-indexes.md +++ /dev/null @@ -1 +0,0 @@ -List indexes in the table. \ No newline at end of file diff --git a/docs/references/grids/list-tables.md b/docs/references/grids/list-tables.md deleted file mode 100644 index e14795eeac..0000000000 --- a/docs/references/grids/list-tables.md +++ /dev/null @@ -1 +0,0 @@ -Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/update-boolean-column.md b/docs/references/grids/update-boolean-column.md deleted file mode 100644 index f5167d97b6..0000000000 --- a/docs/references/grids/update-boolean-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-datetime-column.md b/docs/references/grids/update-datetime-column.md deleted file mode 100644 index e793b41921..0000000000 --- a/docs/references/grids/update-datetime-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-email-column.md b/docs/references/grids/update-email-column.md deleted file mode 100644 index 0db17e29bd..0000000000 --- a/docs/references/grids/update-email-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-enum-column.md b/docs/references/grids/update-enum-column.md deleted file mode 100644 index df172cbc38..0000000000 --- a/docs/references/grids/update-enum-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-float-column.md b/docs/references/grids/update-float-column.md deleted file mode 100644 index 4e0eb9ddb2..0000000000 --- a/docs/references/grids/update-float-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-integer-column.md b/docs/references/grids/update-integer-column.md deleted file mode 100644 index 0f2a07ea6e..0000000000 --- a/docs/references/grids/update-integer-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-ip-column.md b/docs/references/grids/update-ip-column.md deleted file mode 100644 index 115c87a7e1..0000000000 --- a/docs/references/grids/update-ip-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-relationship-column.md b/docs/references/grids/update-relationship-column.md deleted file mode 100644 index dfdcd8ae5a..0000000000 --- a/docs/references/grids/update-relationship-column.md +++ /dev/null @@ -1 +0,0 @@ -Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/update-row.md b/docs/references/grids/update-row.md deleted file mode 100644 index b532ea411d..0000000000 --- a/docs/references/grids/update-row.md +++ /dev/null @@ -1 +0,0 @@ -Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/grids/update-rows.md b/docs/references/grids/update-rows.md deleted file mode 100644 index 334b91aec1..0000000000 --- a/docs/references/grids/update-rows.md +++ /dev/null @@ -1 +0,0 @@ -Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/grids/update-string-column.md b/docs/references/grids/update-string-column.md deleted file mode 100644 index 617214b4c9..0000000000 --- a/docs/references/grids/update-string-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-table.md b/docs/references/grids/update-table.md deleted file mode 100644 index bbd676d3b8..0000000000 --- a/docs/references/grids/update-table.md +++ /dev/null @@ -1 +0,0 @@ -Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/update-url-column.md b/docs/references/grids/update-url-column.md deleted file mode 100644 index 6080d71509..0000000000 --- a/docs/references/grids/update-url-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/upsert-row.md b/docs/references/grids/upsert-row.md deleted file mode 100644 index 1132afd53c..0000000000 --- a/docs/references/grids/upsert-row.md +++ /dev/null @@ -1 +0,0 @@ -Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/upsert-rows.md b/docs/references/grids/upsert-rows.md deleted file mode 100644 index 21aa3da1ef..0000000000 --- a/docs/references/grids/upsert-rows.md +++ /dev/null @@ -1 +0,0 @@ -Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. diff --git a/docs/references/databases/create-boolean-column.md b/docs/references/tablesdb/create-boolean-column.md similarity index 100% rename from docs/references/databases/create-boolean-column.md rename to docs/references/tablesdb/create-boolean-column.md diff --git a/docs/references/databases/create-datetime-column.md b/docs/references/tablesdb/create-datetime-column.md similarity index 100% rename from docs/references/databases/create-datetime-column.md rename to docs/references/tablesdb/create-datetime-column.md diff --git a/docs/references/databases/create-email-column.md b/docs/references/tablesdb/create-email-column.md similarity index 100% rename from docs/references/databases/create-email-column.md rename to docs/references/tablesdb/create-email-column.md diff --git a/docs/references/databases/create-enum-column.md b/docs/references/tablesdb/create-enum-column.md similarity index 100% rename from docs/references/databases/create-enum-column.md rename to docs/references/tablesdb/create-enum-column.md diff --git a/docs/references/databases/create-float-column.md b/docs/references/tablesdb/create-float-column.md similarity index 100% rename from docs/references/databases/create-float-column.md rename to docs/references/tablesdb/create-float-column.md diff --git a/docs/references/grids/create-index.md b/docs/references/tablesdb/create-index.md similarity index 70% rename from docs/references/grids/create-index.md rename to docs/references/tablesdb/create-index.md index 6ce853a217..3a68c04e86 100644 --- a/docs/references/grids/create-index.md +++ b/docs/references/tablesdb/create-index.md @@ -1,2 +1,2 @@ Creates an index on the columns listed. Your index should include all the columns you will query in a single request. -Columns can be `key`, `fulltext`, and `unique`. \ No newline at end of file +Attributes can be `key`, `fulltext`, and `unique`. \ No newline at end of file diff --git a/docs/references/databases/create-integer-column.md b/docs/references/tablesdb/create-integer-column.md similarity index 100% rename from docs/references/databases/create-integer-column.md rename to docs/references/tablesdb/create-integer-column.md diff --git a/docs/references/databases/create-ip-column.md b/docs/references/tablesdb/create-ip-column.md similarity index 100% rename from docs/references/databases/create-ip-column.md rename to docs/references/tablesdb/create-ip-column.md diff --git a/docs/references/databases/create-relationship-column.md b/docs/references/tablesdb/create-relationship-column.md similarity index 100% rename from docs/references/databases/create-relationship-column.md rename to docs/references/tablesdb/create-relationship-column.md diff --git a/docs/references/databases/create-row.md b/docs/references/tablesdb/create-row.md similarity index 100% rename from docs/references/databases/create-row.md rename to docs/references/tablesdb/create-row.md diff --git a/docs/references/databases/create-rows.md b/docs/references/tablesdb/create-rows.md similarity index 100% rename from docs/references/databases/create-rows.md rename to docs/references/tablesdb/create-rows.md diff --git a/docs/references/databases/create-string-column.md b/docs/references/tablesdb/create-string-column.md similarity index 100% rename from docs/references/databases/create-string-column.md rename to docs/references/tablesdb/create-string-column.md diff --git a/docs/references/databases/create-table.md b/docs/references/tablesdb/create-table.md similarity index 100% rename from docs/references/databases/create-table.md rename to docs/references/tablesdb/create-table.md diff --git a/docs/references/databases/create-url-column.md b/docs/references/tablesdb/create-url-column.md similarity index 100% rename from docs/references/databases/create-url-column.md rename to docs/references/tablesdb/create-url-column.md diff --git a/docs/references/grids/create-database.md b/docs/references/tablesdb/create.md similarity index 100% rename from docs/references/grids/create-database.md rename to docs/references/tablesdb/create.md diff --git a/docs/references/databases/decrement-row-column.md b/docs/references/tablesdb/decrement-row-column.md similarity index 100% rename from docs/references/databases/decrement-row-column.md rename to docs/references/tablesdb/decrement-row-column.md diff --git a/docs/references/databases/delete-column.md b/docs/references/tablesdb/delete-column.md similarity index 100% rename from docs/references/databases/delete-column.md rename to docs/references/tablesdb/delete-column.md diff --git a/docs/references/grids/delete-index.md b/docs/references/tablesdb/delete-index.md similarity index 100% rename from docs/references/grids/delete-index.md rename to docs/references/tablesdb/delete-index.md diff --git a/docs/references/databases/delete-row.md b/docs/references/tablesdb/delete-row.md similarity index 100% rename from docs/references/databases/delete-row.md rename to docs/references/tablesdb/delete-row.md diff --git a/docs/references/databases/delete-rows.md b/docs/references/tablesdb/delete-rows.md similarity index 100% rename from docs/references/databases/delete-rows.md rename to docs/references/tablesdb/delete-rows.md diff --git a/docs/references/databases/delete-table.md b/docs/references/tablesdb/delete-table.md similarity index 100% rename from docs/references/databases/delete-table.md rename to docs/references/tablesdb/delete-table.md diff --git a/docs/references/grids/delete-database.md b/docs/references/tablesdb/delete.md similarity index 100% rename from docs/references/grids/delete-database.md rename to docs/references/tablesdb/delete.md diff --git a/docs/references/databases/get-column.md b/docs/references/tablesdb/get-column.md similarity index 100% rename from docs/references/databases/get-column.md rename to docs/references/tablesdb/get-column.md diff --git a/docs/references/tablesdb/get-database-usage.md b/docs/references/tablesdb/get-database-usage.md new file mode 100644 index 0000000000..2c2628a464 --- /dev/null +++ b/docs/references/tablesdb/get-database-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-database.md b/docs/references/tablesdb/get-database.md similarity index 100% rename from docs/references/grids/get-database.md rename to docs/references/tablesdb/get-database.md diff --git a/docs/references/grids/get-index.md b/docs/references/tablesdb/get-index.md similarity index 100% rename from docs/references/grids/get-index.md rename to docs/references/tablesdb/get-index.md diff --git a/docs/references/grids/get-logs.md b/docs/references/tablesdb/get-logs.md similarity index 100% rename from docs/references/grids/get-logs.md rename to docs/references/tablesdb/get-logs.md diff --git a/docs/references/databases/get-row-logs.md b/docs/references/tablesdb/get-row-logs.md similarity index 100% rename from docs/references/databases/get-row-logs.md rename to docs/references/tablesdb/get-row-logs.md diff --git a/docs/references/databases/get-row.md b/docs/references/tablesdb/get-row.md similarity index 100% rename from docs/references/databases/get-row.md rename to docs/references/tablesdb/get-row.md diff --git a/docs/references/databases/get-table-logs.md b/docs/references/tablesdb/get-table-logs.md similarity index 100% rename from docs/references/databases/get-table-logs.md rename to docs/references/tablesdb/get-table-logs.md diff --git a/docs/references/databases/get-table-usage.md b/docs/references/tablesdb/get-table-usage.md similarity index 100% rename from docs/references/databases/get-table-usage.md rename to docs/references/tablesdb/get-table-usage.md diff --git a/docs/references/databases/get-table.md b/docs/references/tablesdb/get-table.md similarity index 100% rename from docs/references/databases/get-table.md rename to docs/references/tablesdb/get-table.md diff --git a/docs/references/tablesdb/get.md b/docs/references/tablesdb/get.md new file mode 100644 index 0000000000..24183f6f6b --- /dev/null +++ b/docs/references/tablesdb/get.md @@ -0,0 +1 @@ +Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. \ No newline at end of file diff --git a/docs/references/databases/increment-row-column.md b/docs/references/tablesdb/increment-row-column.md similarity index 100% rename from docs/references/databases/increment-row-column.md rename to docs/references/tablesdb/increment-row-column.md diff --git a/docs/references/databases/list-columns.md b/docs/references/tablesdb/list-columns.md similarity index 100% rename from docs/references/databases/list-columns.md rename to docs/references/tablesdb/list-columns.md diff --git a/docs/references/tablesdb/list-indexes.md b/docs/references/tablesdb/list-indexes.md new file mode 100644 index 0000000000..a8c687fb2b --- /dev/null +++ b/docs/references/tablesdb/list-indexes.md @@ -0,0 +1 @@ +List indexes in the collection. \ No newline at end of file diff --git a/docs/references/grids/list-rows.md b/docs/references/tablesdb/list-rows.md similarity index 100% rename from docs/references/grids/list-rows.md rename to docs/references/tablesdb/list-rows.md diff --git a/docs/references/databases/list-tables.md b/docs/references/tablesdb/list-tables.md similarity index 100% rename from docs/references/databases/list-tables.md rename to docs/references/tablesdb/list-tables.md diff --git a/docs/references/grids/list-database-usage.md b/docs/references/tablesdb/list-usage.md similarity index 100% rename from docs/references/grids/list-database-usage.md rename to docs/references/tablesdb/list-usage.md diff --git a/docs/references/grids/list-databases.md b/docs/references/tablesdb/list.md similarity index 100% rename from docs/references/grids/list-databases.md rename to docs/references/tablesdb/list.md diff --git a/docs/references/databases/update-boolean-column.md b/docs/references/tablesdb/update-boolean-column.md similarity index 100% rename from docs/references/databases/update-boolean-column.md rename to docs/references/tablesdb/update-boolean-column.md diff --git a/docs/references/databases/update-datetime-column.md b/docs/references/tablesdb/update-datetime-column.md similarity index 100% rename from docs/references/databases/update-datetime-column.md rename to docs/references/tablesdb/update-datetime-column.md diff --git a/docs/references/databases/update-email-column.md b/docs/references/tablesdb/update-email-column.md similarity index 100% rename from docs/references/databases/update-email-column.md rename to docs/references/tablesdb/update-email-column.md diff --git a/docs/references/databases/update-enum-column.md b/docs/references/tablesdb/update-enum-column.md similarity index 100% rename from docs/references/databases/update-enum-column.md rename to docs/references/tablesdb/update-enum-column.md diff --git a/docs/references/databases/update-float-column.md b/docs/references/tablesdb/update-float-column.md similarity index 100% rename from docs/references/databases/update-float-column.md rename to docs/references/tablesdb/update-float-column.md diff --git a/docs/references/databases/update-integer-column.md b/docs/references/tablesdb/update-integer-column.md similarity index 100% rename from docs/references/databases/update-integer-column.md rename to docs/references/tablesdb/update-integer-column.md diff --git a/docs/references/databases/update-ip-column.md b/docs/references/tablesdb/update-ip-column.md similarity index 100% rename from docs/references/databases/update-ip-column.md rename to docs/references/tablesdb/update-ip-column.md diff --git a/docs/references/databases/update-relationship-column.md b/docs/references/tablesdb/update-relationship-column.md similarity index 100% rename from docs/references/databases/update-relationship-column.md rename to docs/references/tablesdb/update-relationship-column.md diff --git a/docs/references/databases/update-row.md b/docs/references/tablesdb/update-row.md similarity index 100% rename from docs/references/databases/update-row.md rename to docs/references/tablesdb/update-row.md diff --git a/docs/references/databases/update-rows.md b/docs/references/tablesdb/update-rows.md similarity index 100% rename from docs/references/databases/update-rows.md rename to docs/references/tablesdb/update-rows.md diff --git a/docs/references/databases/update-string-column.md b/docs/references/tablesdb/update-string-column.md similarity index 100% rename from docs/references/databases/update-string-column.md rename to docs/references/tablesdb/update-string-column.md diff --git a/docs/references/databases/update-table.md b/docs/references/tablesdb/update-table.md similarity index 100% rename from docs/references/databases/update-table.md rename to docs/references/tablesdb/update-table.md diff --git a/docs/references/databases/update-url-column.md b/docs/references/tablesdb/update-url-column.md similarity index 100% rename from docs/references/databases/update-url-column.md rename to docs/references/tablesdb/update-url-column.md diff --git a/docs/references/grids/update-database.md b/docs/references/tablesdb/update.md similarity index 100% rename from docs/references/grids/update-database.md rename to docs/references/tablesdb/update.md diff --git a/docs/references/databases/upsert-row.md b/docs/references/tablesdb/upsert-row.md similarity index 100% rename from docs/references/databases/upsert-row.md rename to docs/references/tablesdb/upsert-row.md diff --git a/docs/references/databases/upsert-rows.md b/docs/references/tablesdb/upsert-rows.md similarity index 100% rename from docs/references/databases/upsert-rows.md rename to docs/references/tablesdb/upsert-rows.md diff --git a/docs/services/tables.md b/docs/services/tables.md deleted file mode 100644 index f0c252db30..0000000000 --- a/docs/services/tables.md +++ /dev/null @@ -1,7 +0,0 @@ -The Tables service allows you to create structured tables of rows, query and filter lists of rows, and manage an advanced set of read and write access permissions. - -All data returned by the Tables service are represented as structured JSON objects. - -The Tables service can contain multiple databases, each database can contain multiple tables. A table is a group of similarly structured rows. The accepted structure of rows is defined by [table columns](https://appwrite.io/docs/databases#columns). The table columns help you ensure all your user-submitted data is validated and stored according to the table structure. - -Using Appwrite permissions architecture, you can assign read or write access to each table or row in your project for either a specific user, team, user role, or even grant it with public access (`any`). You can learn more about [how Appwrite handles permissions and access control](https://appwrite.io/docs/permissions). \ No newline at end of file diff --git a/docs/services/tablesdb.md b/docs/services/tablesdb.md new file mode 100644 index 0000000000..b64fb92e34 --- /dev/null +++ b/docs/services/tablesdb.md @@ -0,0 +1,7 @@ +The TablesDB service allows you to create structured tables of rows, query and filter lists of rows, and manage an advanced set of read and write access permissions. + +All data returned by the TablesDB service are represented as structured JSON objects. + +The TablesDB service can contain multiple databases, each database can contain multiple tables. A table is a group of similarly structured rows. The accepted structure of rows is defined by [table columns](https://appwrite.io/docs/databases#columns). The table columns help you ensure all your user-submitted data is validated and stored according to the table structure. + +Using Appwrite permissions architecture, you can assign read or write access to each table or row in your project for either a specific user, team, user role, or even grant it with public access (`any`). You can learn more about [how Appwrite handles permissions and access control](https://appwrite.io/docs/permissions). \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 598b730908..4c4e55ea4e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -6,7 +6,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="true" + stopOnFailure="false" > diff --git a/src/Appwrite/Platform/Action.php b/src/Appwrite/Platform/Action.php index e5a7cf7984..056a33b320 100644 --- a/src/Appwrite/Platform/Action.php +++ b/src/Appwrite/Platform/Action.php @@ -25,6 +25,14 @@ class Action extends UtopiaAction 'subQueryVariables', // Sites ]; + /** + * Attributes to remove from relationship path documents per API + * Default is empty - APIs should set their specific attributes + * + * @var array + */ + protected array $removableAttributes = []; + /** * Foreach Document * Call provided callback for each document in the collection diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php index e7c9814655..441743225a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -20,17 +20,16 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = TABLES; } - return parent::setHttpPath($path); } /** * Get the current API context. */ - final protected function getContext(): string + protected function getContext(): string { return $this->context; } @@ -38,7 +37,7 @@ abstract class Action extends UtopiaAction /** * Get the key used in event parameters (e.g., 'collectionId' or 'tableId'). */ - final protected function getEventsParamKey(): string + protected function getEventsParamKey(): string { return $this->getContext() . 'Id'; } @@ -46,7 +45,7 @@ abstract class Action extends UtopiaAction /** * Determine if the current action is for the Collections API. */ - final protected function isCollectionsAPI(): bool + protected function isCollectionsAPI(): bool { return $this->getContext() === COLLECTIONS; } @@ -54,7 +53,7 @@ abstract class Action extends UtopiaAction /** * Get the SDK group name for the current action. */ - final protected function getSdkGroup(): string + protected function getSdkGroup(): string { return $this->isCollectionsAPI() ? 'collections' : 'tables'; } @@ -62,15 +61,15 @@ abstract class Action extends UtopiaAction /** * Get the SDK namespace for the current action. */ - final protected function getSdkNamespace(): string + protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDb'; } /** * Get the exception to throw when the resource already exists. */ - final protected function getDuplicateException(): string + protected function getDuplicateException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_ALREADY_EXISTS @@ -80,7 +79,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate index invalid exception. */ - final protected function getInvalidIndexException(): string + protected function getInvalidIndexException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_INVALID @@ -90,7 +89,7 @@ abstract class Action extends UtopiaAction /** * Get the exception to throw when the resource is not found. */ - final protected function getNotFoundException(): string + protected function getNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND @@ -100,7 +99,7 @@ abstract class Action extends UtopiaAction /** * Get the exception to throw when the resource limit is exceeded. */ - final protected function getLimitException(): string + protected function getLimitException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_LIMIT_EXCEEDED diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 765741ef41..9edf57b489 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -37,17 +37,16 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = COLUMNS; } - return parent::setHttpPath($path); } /** * Get the current context. */ - final protected function getContext(): string + protected function getContext(): string { return $this->context; } @@ -55,7 +54,7 @@ abstract class Action extends UtopiaAction /** * Returns true if current context is Collections API. */ - final protected function isCollectionsAPI(): bool + protected function isCollectionsAPI(): bool { // columns in tables context // attributes in collections context @@ -67,7 +66,7 @@ abstract class Action extends UtopiaAction * * Can be used for XList operations as well! */ - final protected function getSdkGroup(): string + protected function getSdkGroup(): string { return $this->isCollectionsAPI() ? 'attributes' : 'columns'; } @@ -75,15 +74,15 @@ abstract class Action extends UtopiaAction /** * Get the SDK namespace for the current action. */ - final protected function getSdkNamespace(): string + protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDb'; } /** * Get the appropriate parent level not found exception. */ - final protected function getParentNotFoundException(): string + protected function getParentNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND @@ -93,7 +92,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate not found exception. */ - final protected function getNotFoundException(): string + protected function getNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_NOT_FOUND @@ -103,7 +102,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate not found exception. */ - final protected function getIndexDependencyException(): string + protected function getIndexDependencyException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_DEPENDENCY @@ -113,7 +112,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate already exists exception. */ - final protected function getDuplicateException(): string + protected function getDuplicateException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_ALREADY_EXISTS @@ -123,7 +122,7 @@ abstract class Action extends UtopiaAction /** * Get the correct invalid structure message. */ - final protected function getInvalidStructureException(): string + protected function getInvalidStructureException(): string { return $this->isCollectionsAPI() ? Exception::DOCUMENT_INVALID_STRUCTURE @@ -133,7 +132,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate limit exceeded exception. */ - final protected function getLimitException(): string + protected function getLimitException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_LIMIT_EXCEEDED @@ -143,7 +142,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate index invalid exception. */ - final protected function getInvalidIndexException(): string + protected function getInvalidIndexException(): string { return $this->isCollectionsAPI() ? Exception::INDEX_INVALID @@ -153,7 +152,7 @@ abstract class Action extends UtopiaAction /** * Get the correct default unsupported message. */ - final protected function getDefaultUnsupportedException(): string + protected function getDefaultUnsupportedException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED @@ -163,7 +162,7 @@ abstract class Action extends UtopiaAction /** * Get the correct format unsupported message. */ - final protected function getFormatUnsupportedException(): string + protected function getFormatUnsupportedException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_FORMAT_UNSUPPORTED @@ -173,7 +172,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for invalid type or format mismatch. */ - final protected function getTypeInvalidException(): string + protected function getTypeInvalidException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_TYPE_INVALID @@ -183,7 +182,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for resizing invalid attributes/columns. */ - final protected function getInvalidResizeException(): string + protected function getInvalidResizeException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_INVALID_RESIZE @@ -193,7 +192,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for invalid attributes/columns value. */ - final protected function getInvalidValueException(): string + protected function getInvalidValueException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_VALUE_INVALID @@ -203,7 +202,7 @@ abstract class Action extends UtopiaAction /** * Get the exception for non-available column/attribute. */ - final protected function getNotAvailableException(): string + protected function getNotAvailableException(): string { return $this->isCollectionsAPI() ? Exception::ATTRIBUTE_NOT_AVAILABLE @@ -213,7 +212,7 @@ abstract class Action extends UtopiaAction /** * Get the correct collections context for Events queue. */ - final protected function getCollectionsEventsContext(): string + protected function getCollectionsEventsContext(): string { return $this->isCollectionsAPI() ? 'collection' : 'table'; } @@ -221,7 +220,7 @@ abstract class Action extends UtopiaAction /** * Get the proper column/attribute type based on set context. */ - final protected function getModel(string $type, string $format): string + protected function getModel(string $type, string $format): string { $isCollections = $this->isCollectionsAPI(); @@ -273,7 +272,7 @@ abstract class Action extends UtopiaAction }; } - final protected function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document + protected function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document { $key = $attribute->getAttribute('key'); $type = $attribute->getAttribute('type', ''); @@ -435,7 +434,7 @@ abstract class Action extends UtopiaAction return $attribute; } - final protected function updateAttribute(string $databaseId, string $collectionId, string $key, Database $dbForProject, Event $queueForEvents, string $type, int $size = null, string $filter = null, string|bool|int|float $default = null, bool $required = null, int|float|null $min = null, int|float|null $max = null, array $elements = null, array $options = [], string $newKey = null): Document + protected function updateAttribute(string $databaseId, string $collectionId, string $key, Database $dbForProject, Event $queueForEvents, string $type, int $size = null, string $filter = null, string|bool|int|float $default = null, bool $required = null, int|float|null $min = null, int|float|null $max = null, array $elements = null, array $options = [], string $newKey = null): Document { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index ba44cf5900..d1f213c508 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -55,7 +55,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createBooleanColumn', + replaceWith: 'tablesDb.createBooleanColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 2c46e457b8..ad17f12f7c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -56,7 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateBooleanColumn', + replaceWith: 'tablesDb.updateBooleanColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 693b87726e..fdc6a8eb63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createDatetimeColumn', + replaceWith: 'tablesDb.createDatetimeColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 3bc76b5ecb..ba7ea9c3c7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateDatetimeColumn', + replaceWith: 'tablesDb.updateDatetimeColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index c86bb956f9..3c7b532670 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -57,7 +57,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteColumn', + replaceWith: 'tablesDb.deleteColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 6638622bae..3ad91b6144 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createEmailColumn', + replaceWith: 'tablesDb.createEmailColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 66d0e611b4..f196b08cae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateEmailColumn', + replaceWith: 'tablesDb.updateEmailColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 414aa12e1b..c78d710ee6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createEnumColumn', + replaceWith: 'tablesDb.createEnumColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 201af5c394..8c26c970a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -58,7 +58,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateEnumColumn', + replaceWith: 'tablesDb.updateEnumColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 4d2bb1f827..c7619ca854 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createFloatColumn', + replaceWith: 'tablesDb.createFloatColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 74e81210be..2995ff6346 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateFloatColumn', + replaceWith: 'tablesDb.updateFloatColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 5fedfc608a..89be3bcd8b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -60,7 +60,7 @@ class Get extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getColumn', + replaceWith: 'tablesDb.getColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index a022fe39a9..2488d64a55 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createIpColumn', + replaceWith: 'tablesDb.createIpColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 70495b1755..ece9020bf5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateIpColumn', + replaceWith: 'tablesDb.updateIpColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index d7c345759d..d8b192aff8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createIntegerColumn', + replaceWith: 'tablesDb.createIntegerColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index c29f634114..c2cd40e8a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateIntegerColumn', + replaceWith: 'tablesDb.updateIntegerColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index a4112bacd1..425f82bd9a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createRelationshipColumn', + replaceWith: 'tablesDb.createRelationshipColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index b71d7175a0..c8d6fc48b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -55,7 +55,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateRelationshipColumn', + replaceWith: 'tablesDb.updateRelationshipColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index d3fa0a01dc..512dd2d886 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -60,7 +60,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createStringColumn', + replaceWith: 'tablesDb.createStringColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index e450abe88a..9755b48c16 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -59,7 +59,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateStringColumn', + replaceWith: 'tablesDb.updateStringColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index 86474d4ca4..17bc2c6a1d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createUrlColumn', + replaceWith: 'tablesDb.createUrlColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index c3e6456c11..42106cd40e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateUrlColumn', + replaceWith: 'tablesDb.updateUrlColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 7b01e7c4fa..27243291c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -54,7 +54,7 @@ class XList extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listColumns', + replaceWith: 'tablesDb.listColumns', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index c3fdd372ee..3f94b393cb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -65,7 +65,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createTable', + replaceWith: 'tablesDb.createTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index f6755f7437..b0d2c905cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -55,7 +55,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteTable', + replaceWith: 'tablesDb.deleteTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 002c777dec..f0185b336b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -4,12 +4,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documen use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Action as AppwriteAction; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; -use Utopia\Platform\Action as UtopiaAction; -abstract class Action extends UtopiaAction +abstract class Action extends AppwriteAction { /** * @var string|null The current context (either 'row' or 'document') @@ -21,12 +21,16 @@ abstract class Action extends UtopiaAction */ abstract protected function getResponseModel(): string; - public function setHttpPath(string $path): UtopiaAction + public function setHttpPath(string $path): AppwriteAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (str_contains($path, '/tablesdb/')) { $this->context = ROWS; } + // Use the same helper method to ensure consistency + $contextId = '$' . $this->getCollectionsEventsContext() . 'Id'; + $this->removableAttributes = ['$databaseId', $contextId]; + return parent::setHttpPath($path); } @@ -73,7 +77,7 @@ abstract class Action extends UtopiaAction */ protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDb'; } /** @@ -192,6 +196,17 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collection' : 'table'; } + /** + * Remove configured removable attributes from a document. + * Used for relationship path handling to remove API-specific attributes. + */ + protected function removeReadonlyAttributes(Document $document): void + { + foreach ($this->removableAttributes as $attribute) { + $document->removeAttribute($attribute); + } + } + /** * Resolves relationships in a document and attaches metadata. */ @@ -218,7 +233,7 @@ abstract class Action extends UtopiaAction $collectionId = $collection->getId(); $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collectionId); + $document->setAttribute('$' . $this->getCollectionsEventsContext() . 'Id', $collectionId); $relationships = $collectionsCache[$collectionId] ??= \array_filter( $collection->getAttribute('attributes', []), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index a97e3b97e4..a449fd9156 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -66,7 +66,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.decrementRowColumn', + replaceWith: 'tablesDb.decrementRowColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index e213a347d9..5f04e507df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -66,7 +66,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.incrementRowColumn', + replaceWith: 'tablesDb.incrementRowColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index f44e54f2b4..a4f5255e35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -64,7 +64,7 @@ class Delete extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteRows', + replaceWith: 'tablesDb.deleteRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -128,7 +128,7 @@ class Delete extends Action foreach ($documents as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 82b39ef178..af315b4f7f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -67,7 +67,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateRows', + replaceWith: 'tablesDb.updateRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -152,7 +152,7 @@ class Update extends Action foreach ($documents as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 23e6453138..2a24085056 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -64,7 +64,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.upsertRows', + replaceWith: 'tablesDb.upsertRows', ), ) ]) @@ -129,7 +129,7 @@ class Upsert extends Action foreach ($upserted as $document) { $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $document->setAttribute('$'.$this->getCollectionsEventsContext().'Id', $collection->getId()); } $queueForStatsUsage diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 378ab8cfd0..002cc90554 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -85,7 +85,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createRow', + replaceWith: 'tablesDb.createRow', ), ), new Method( @@ -109,7 +109,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createRows', + replaceWith: 'tablesDb.createRows', ), ) ]) @@ -318,8 +318,7 @@ class Create extends Action $relation['$id'] = ID::unique(); } } else { - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); + $this->removeReadonlyAttributes($relation); $relation->setAttribute('$collection', $relatedCollection->getId()); $type = Database::PERMISSION_UPDATE; } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 7bc81ab7db..a76e272ee4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -65,7 +65,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteRow', + replaceWith: 'tablesDb.deleteRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index f3e2a24672..994cf3e375 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -56,7 +56,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getRow', + replaceWith: 'tablesDb.getRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 0f8a8688c6..2298147182 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -62,7 +62,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listRowLogs', + replaceWith: 'tablesDb.listRowLogs', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index fe08d1ed85..34b939bda3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -69,7 +69,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateRow', + replaceWith: 'tablesDb.updateRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -209,8 +209,7 @@ class Update extends Action 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), $relation->getId() )); - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); + $this->removeReadonlyAttributes($relation); // Attribute $collection is required for Utopia. $relation->setAttribute( '$collection', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index e862896a40..05362cd996 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -71,7 +71,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.upsertRow', + replaceWith: 'tablesDb.upsertRow', ), ), ]) @@ -213,8 +213,7 @@ class Upsert extends Action 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), $relation->getId() )); - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); + $this->removeReadonlyAttributes($relation); // Attribute $collection is required for Utopia. $relation->setAttribute( '$collection', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 42fe51e09a..f2574af21c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -59,7 +59,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listRows', + replaceWith: 'tablesDb.listRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') @@ -73,16 +73,15 @@ class XList extends Action public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); } @@ -120,16 +119,14 @@ class XList extends Action $cursor->setValue($cursorDocument); } - $selectQueries = []; - try { $selectQueries = Query::groupByType($queries)['selections'] ?? []; if (! empty($selectQueries)) { - // has selects, allow relationship on documents! + // has selects, allow relationship on documents $documents = $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries); } else { - // has no selects, disable relationship looping on documents! + // has no selects, disable relationship loading on documents /* @type Document[] $documents */ $documents = $dbForProject->skipRelationships(fn () => $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries)); } @@ -161,17 +158,10 @@ class XList extends Action ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - $response->addHeader('X-Debug-Operations', $operations); - - $select = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT); - }, false); - - // Check if the SELECT query includes $databaseId and $collectionId + // Check if the SELECT query includes the removable attributes $hasWildcard = false; - $hasDatabaseId = false; - $hasCollectionId = false; $hasSelectQueries = !empty($selectQueries); + $requestedAttributes = []; if ($hasSelectQueries) { foreach ($selectQueries as $query) { @@ -185,22 +175,21 @@ class XList extends Action break; } - if (\in_array('$databaseId', $values, true)) { - $hasDatabaseId = true; - } - - if (\in_array('$collectionId', $values, true)) { - $hasCollectionId = true; + // Check which removable attributes are explicitly requested + foreach ($this->removableAttributes as $attribute) { + if (\in_array($attribute, $values, true)) { + $requestedAttributes[$attribute] = true; + } } } if (!$hasWildcard) { foreach ($documents as $document) { - if (!$hasDatabaseId) { - $document->removeAttribute('$databaseId'); - } - if (!$hasCollectionId) { - $document->removeAttribute('$collectionId'); + // Remove attributes that are not explicitly requested + foreach ($this->removableAttributes as $attribute) { + if (!isset($requestedAttributes[$attribute])) { + $document->removeAttribute($attribute); + } } } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 3dfff2a621..a66419905a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -50,7 +50,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getTable', + replaceWith: 'tablesDb.getTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index bafa9d0b91..76663e409f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -19,10 +19,9 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/grids/tables')) { + if (\str_contains($path, '/tablesdb')) { $this->context = COLUMN_INDEX; } - return parent::setHttpPath($path); } @@ -63,7 +62,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'grids'; + return $this->isCollectionsAPI() ? 'databases' : 'tablesDb'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php index 5ba1fff5bf..ead36eaeac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php @@ -65,7 +65,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createIndex', + replaceWith: 'tablesDb.createIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 80ccd8fadf..05ad863ef8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -60,7 +60,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteIndex', + replaceWith: 'tablesDb.deleteIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 475835538a..4dfbbe146c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -51,7 +51,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getIndex', + replaceWith: 'tablesDb.getIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 643360c12d..6c1e4b1535 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -56,7 +56,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listIndexes', + replaceWith: 'tablesDb.listIndexes', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 359fed118a..f634b97c09 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -62,7 +62,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listTableLogs', + replaceWith: 'tablesDb.listTableLogs', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index 03148eeb2b..54fddcf3b7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -58,7 +58,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateTable', + replaceWith: 'tablesDb.updateTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index ec46f77581..9dd9858557 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -55,7 +55,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getTableUsage', + replaceWith: 'tablesDb.getTableUsage', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 1b2f3cab32..1291142816 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -57,7 +57,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listTables', + replaceWith: 'tablesDb.listTables', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index b2f89f92f2..21f76c8ecb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -60,28 +60,14 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.createDatabase', + replaceWith: 'tablesDb.createDatabase', ) - ), - new Method( - namespace: 'grids', - group: 'grids', - name: 'createDatabase', - description: '/docs/references/grids/create-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON ) ]) ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) - ->param('type', 'grids', new WhiteList(['grids','legacy']), 'Database type.', true) + ->param('type', 'tablesdb', new WhiteList(['tablesdb','legacy']), 'Database type.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') @@ -103,8 +89,6 @@ class Create extends Action } catch (DuplicateException) { throw new Exception(Exception::DATABASE_ALREADY_EXISTS); } catch (StructureException $e) { - // TODO: @Jake, how do we handle this document/row? - // there's no context awareness at this level on what the api is. throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 388b5edf7e..bd0f52d3cd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -51,23 +51,9 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.deleteDatabase', + replaceWith: 'tablesDb.delete', ) ), - new Method( - namespace: 'grids', - group: 'grids', - name: 'deleteDatabase', - description: '/docs/references/grids/delete-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_NOCONTENT, - model: UtopiaResponse::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index a3ac4d0da0..d910fc20de 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -46,23 +46,9 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.getDatabase', + replaceWith: 'tablesDb.get', ) ), - new Method( - namespace: 'grids', - group: 'grids', - name: 'getDatabase', - description: '/docs/references/grids/get-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php index 5828b9f8b8..ed34257537 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -58,23 +58,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabaseLogs', + replaceWith: 'tablesDb.listDatabaseLogs', ) ), - new Method( - namespace: 'grids', - group: 'logs', - name: 'listDatabaseLogs', - description: '/docs/references/grids/list-database-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_LOG_LIST, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index b2b268075c..95268cc2e4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -52,23 +52,9 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.updateDatabase', + replaceWith: 'tablesDb.update', ) ), - new Method( - namespace: 'grids', - group: 'grids', - name: 'updateDatabase', - description: '/docs/references/grids/update-database.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 8efb6ae0ee..69b1fb088d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -39,7 +39,7 @@ class Get extends Action new Method( namespace: 'databases', group: null, - name: self::getName(), + name: 'getUsage', description: '/docs/references/databases/get-database-usage.md', auth: [AuthType::ADMIN], responses: [ @@ -51,24 +51,9 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.' . self::getName(), + replaceWith: 'tablesDb.getUsage' ) - ), - new Method( - namespace: 'grids', - group: null, - name: self::getName(), - description: '/docs/references/grids/get-database-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASE, - ) - ], - contentType: ContentType::JSON, - ), - + ) ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 31d520611e..bf8a53677b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -21,7 +21,7 @@ class XList extends Action { public static function getName(): string { - return 'listUsage'; + return 'listDatabaseUsage'; } public function __construct() @@ -37,7 +37,7 @@ class XList extends Action new Method( namespace: 'databases', group: null, - name: self::getName(), + name: 'listUsage', description: '/docs/references/databases/list-usage.md', auth: [AuthType::ADMIN], responses: [ @@ -49,23 +49,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabaseUsage' + replaceWith: 'tablesDb.listUsage' ) ), - new Method( - namespace: 'grids', - group: null, - name: 'listDatabaseUsage', - description: '/docs/references/grids/list-database-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASES, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index fdf3428101..35ea455afc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -52,23 +52,9 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'grids.listDatabases', + replaceWith: 'tablesDb.list', ) ), - new Method( - namespace: 'grids', - group: 'grids', - name: 'listDatabases', - description: '/docs/references/grids/list-databases.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE_LIST, - ) - ], - contentType: ContentType::JSON - ), ]) ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php new file mode 100644 index 0000000000..762be79590 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php @@ -0,0 +1,59 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/tablesdb') + ->desc('Create database') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].create') + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'database.create') + ->label('audits.resource', 'database/{response.$id}') + ->label('sdk', new Method( + namespace: 'tablesDb', + group: 'tablesdb', + name: 'create', + description: '/docs/references/tablesdb/create.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') + ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) + ->param('type', 'tablesdb', new WhiteList(['tablesdb','legacy']), 'Database type.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php new file mode 100644 index 0000000000..9c4d087d48 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Delete.php @@ -0,0 +1,55 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/tablesdb/:databaseId') + ->desc('Delete database') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].delete') + ->label('audits.event', 'database.delete') + ->label('audits.resource', 'database/{request.databaseId}') + ->label('sdk', new Method( + namespace: 'tablesDb', + group: 'tablesdb', + name: 'delete', + description: '/docs/references/tablesdb/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php new file mode 100644 index 0000000000..95c1f25ad5 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Get.php @@ -0,0 +1,49 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId') + ->desc('Get database') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'tablesDb', + group: 'tablesdb', + name: 'get', + description: '/docs/references/tablesdb/get.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php new file mode 100644 index 0000000000..89d1dd485f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Logs/XList.php @@ -0,0 +1,142 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId/logs') + ->desc('List database logs') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDb', + group: 'logs', + name: 'listDatabaseLogs', + description: '/docs/references/tablesdb/get-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + ), + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback($this->action(...)); + } + + public function action(string $databaseId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId; + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = $log['userAgent'] ?: 'UNKNOWN'; + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => ID::custom($log['data']['userId']), + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'], + ]); + + $record = $geodb->get($log['ip']); + if ($record) { + $countryCode = strtolower($record['country']['iso_code']); + $output[$i]['countryCode'] = $locale->getText("countries.{$countryCode}", false) ? $countryCode : '--'; + $output[$i]['countryName'] = $locale->getText("countries.{$countryCode}", $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'total' => $audit->countLogsByResource($resource, $queries), + 'logs' => $output, + ]), UtopiaResponse::MODEL_LOG_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php index a28b52aef0..adb62f532e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/boolean') ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-boolean-column.md', + description: '/docs/references/tablesdb/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php index c2f40c96fb..9863d9b7b7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-boolean-column.md', + description: '/docs/references/tablesdb/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php index f1214f707b..e060e04d7d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-datetime-column.md', + description: '/docs/references/tablesdb/create-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php index f2f5001242..bfba375443 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-datetime-column.md', + description: '/docs/references/tablesdb/update-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php index 9af55bee70..555af833df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-column.md', + description: '/docs/references/tablesdb/delete-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php index 3fd8d88fb5..b2d09d4511 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-email-column.md', + description: '/docs/references/tablesdb/create-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php index 180ce40b6d..15f85eef81 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-email-column.md', + description: '/docs/references/tablesdb/update-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php index c3ccffec1e..52972deadf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-enum-column.md', + description: '/docs/references/tablesdb/create-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php index 32f77a488a..cd9c111812 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-enum-column.md', + description: '/docs/references/tablesdb/update-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php index 42699ca45e..0a60796679 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-float-column.md', + description: '/docs/references/tablesdb/create-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php index cd801450c7..d4f8328e30 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-float-column.md', + description: '/docs/references/tablesdb/update-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php index 295a4ff530..8debcb11f3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -47,7 +47,7 @@ class Get extends AttributesGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-column.md', + description: '/docs/references/tablesdb/get-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php index 541214897e..eca17b037d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-ip-column.md', + description: '/docs/references/tablesdb/create-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php index c52105c812..501de3659a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-ip-column.md', + description: '/docs/references/tablesdb/update-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php index 9873ad83b1..0201ebda87 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-integer-column.md', + description: '/docs/references/tablesdb/create-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php index e70f8bf7b0..0667069a39 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-integer-column.md', + description: '/docs/references/tablesdb/update-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php index d6942a4d15..4b94ee2d21 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/relationship') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-relationship-column.md', + description: '/docs/references/tablesdb/create-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php index 729760bde0..47269fc329 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key/relationship') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-relationship-column.md', + description: '/docs/references/tablesdb/update-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php index 5829ce5361..52df9dc5e0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-string-column.md', + description: '/docs/references/tablesdb/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php index 6333443686..bfad80e3b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-string-column.md', + description: '/docs/references/tablesdb/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php index 429ef06dbd..ea2271b85a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/create-url-column.md', + description: '/docs/references/tablesdb/create-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php index de4b4ab79b..565cc91680 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-url-column.md', + description: '/docs/references/tablesdb/update-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php index d8b6e39ac6..1bf8f08438 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -36,7 +36,7 @@ class XList extends AttributesXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/list-columns.md', + description: '/docs/references/tablesdb/list-columns.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index f4274079bc..d3216d4dd4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables') + ->setHttpPath('/v1/tablesdb/:databaseId/tables') ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/create-table.md', + description: '/docs/references/tablesdb/create-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php index 13c3a7196b..51779d71c7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].delete') ->label('audits.event', 'table.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/delete-table.md', + description: '/docs/references/tablesdb/delete-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php index 3ac36d27ca..d14a15da51 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -36,7 +36,7 @@ class Get extends CollectionGet namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/get-table.md', + description: '/docs/references/tablesdb/get-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php index 9bb3d6f123..6d35355981 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'createIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/grids/create-index.md', + description: '/docs/references/tablesdb/create-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php index 679de9b77c..bad49b251f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'deleteIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/grids/delete-index.md', + description: '/docs/references/tablesdb/delete-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php index f2c7cbcb94..7a40f8c6ea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -37,7 +37,7 @@ class Get extends IndexGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'getIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/grids/get-index.md', + description: '/docs/references/tablesdb/get-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php index 4ec7da0a41..156f6eb0c6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -37,7 +37,7 @@ class XList extends IndexXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'listIndexes', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/grids/list-indexes.md', + description: '/docs/references/tablesdb/list-indexes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php index 1c24a23175..a659f1b23b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/logs') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -33,7 +33,7 @@ class XList extends CollectionLogXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-table-logs.md', + description: '/docs/references/tablesdb/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php index 6816fc3b13..cb882eb682 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -43,7 +43,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-rows.md', + description: '/docs/references/tablesdb/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php index 8c640f00f8..bc9d4ee0aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -44,7 +44,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-rows.md', + description: '/docs/references/tablesdb/update-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php index 35f0a99bdc..ca0511c9c2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -44,7 +44,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/upsert-rows.md', + description: '/docs/references/tablesdb/upsert-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php index fffd6db0fd..023f7efe77 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/decrement') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -44,7 +44,7 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/decrement-row-column.md', + description: '/docs/references/tablesdb/decrement-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php index 67cbd81367..092fb1c43f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/increment') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/:column/increment') ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -44,7 +44,7 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/increment-row-column.md', + description: '/docs/references/tablesdb/increment-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index a9101e0265..a3968b524f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -54,7 +54,7 @@ class Create extends DocumentCreate group: $this->getSdkGroup(), name: self::getName(), desc: 'Create row', - description: '/docs/references/grids/create-row.md', + description: '/docs/references/tablesdb/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -76,7 +76,7 @@ class Create extends DocumentCreate group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), desc: 'Create rows', - description: '/docs/references/grids/create-rows.md', + description: '/docs/references/tablesdb/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php index f821aabe6e..4f051e05f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') ->label('audits.event', 'row.delete') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{request.rowId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{request.rowId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -48,7 +48,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/delete-row.md', + description: '/docs/references/tablesdb/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php index 1015e01819..a863f59ea4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) ->label('scope', 'rows.read') @@ -38,7 +38,7 @@ class Get extends DocumentGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/get-row.md', + description: '/docs/references/tablesdb/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php index 4522b3005f..24b664d812 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/logs') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) ->label('scope', 'rows.read') @@ -33,7 +33,7 @@ class XList extends DocumentLogXList namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), - description: '/docs/references/grids/get-row-logs.md', + description: '/docs/references/tablesdb/get-row-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php index 7731e10e9d..a38ae37b58 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -45,7 +45,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/update-row.md', + description: '/docs/references/tablesdb/update-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php index d9756eab87..234e504916 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -46,7 +46,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/upsert-row.md', + description: '/docs/references/tablesdb/upsert-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php index d2589e4b63..9b5c4da77c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) ->label('scope', 'rows.read') @@ -38,7 +38,7 @@ class XList extends DocumentXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/list-rows.md', + description: '/docs/references/tablesdb/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php index b4e8df6e57..22adc17dc8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].update') ->label('audits.event', 'table.update') - ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/update-table.md', + description: '/docs/references/tablesdb/update-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php index 015c2c2592..0cda3770f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/usage') + ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) ->label('scope', 'tables.read') @@ -37,7 +37,7 @@ class Get extends CollectionUsageGet namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/get-table-usage.md', + description: '/docs/references/tablesdb/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php index fd329ea6aa..9f68c073a2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/grids/tables') + ->setHttpPath('/v1/tablesdb/:databaseId/tables') ->desc('List tables') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -38,7 +38,7 @@ class XList extends CollectionXList namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/grids/list-tables.md', + description: '/docs/references/tablesdb/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php new file mode 100644 index 0000000000..4a1d6c273c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php @@ -0,0 +1,57 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/tablesdb/:databaseId') + ->desc('Update database') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].update') + ->label('audits.event', 'database.update') + ->label('audits.resource', 'database/{response.$id}') + ->label('sdk', new Method( + namespace: 'tablesDb', + group: 'tablesdb', + name: 'update', + description: '/docs/references/tablesdb/update.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') + ->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php new file mode 100644 index 0000000000..1f35adc749 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php @@ -0,0 +1,53 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/:databaseId/usage') + ->desc('Get TablesDB usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'tables.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDb', + group: null, + name: 'getUsage', + description: '/docs/references/tablesdb/get-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + ), + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php new file mode 100644 index 0000000000..4a20d76c02 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php @@ -0,0 +1,51 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb/usage') + ->desc('Get TablesDB usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'tables.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', [ + new Method( + namespace: 'tablesDb', + group: null, + name: 'listUsage', + description: '/docs/references/tablesdb/list-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON + ), + ]) + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php new file mode 100644 index 0000000000..90fc934755 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/XList.php @@ -0,0 +1,51 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/tablesdb') + ->desc('List databases') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'tablesDb', + group: 'tablesdb', + name: 'list', + description: '/docs/references/tablesdb/list.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('response') + ->inject('dbForProject') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index d2f66f3657..ccd9dfd140 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -14,7 +14,6 @@ class Http extends Service { $this->type = Service::TYPE_HTTP; - // Project database timeout init hook! $this->addAction(Timeout::getName(), new Timeout()); foreach ([ diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index aad8571553..7772aff933 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -2,52 +2,59 @@ namespace Appwrite\Platform\Modules\Databases\Services\Registry; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean\Create as CreateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean\Update as UpdateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime\Create as CreateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime\Update as UpdateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Delete as DeleteColumn; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email\Create as CreateEmail; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email\Update as UpdateEmail; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum\Create as CreateEnum; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum\Update as UpdateEnum; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float\Create as CreateFloat; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float\Update as UpdateFloat; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Get as GetColumn; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer\Create as CreateInteger; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer\Update as UpdateInteger; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP\Create as CreateIP; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP\Update as UpdateIP; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship\Create as CreateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship\Update as UpdateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String\Create as CreateString; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String\Update as UpdateString; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL\Create as CreateURL; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL\Update as UpdateURL; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\XList as ListColumns; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Create as CreateTable; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Delete as DeleteTable; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Get as GetTable; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Create as CreateColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Delete as DeleteColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Get as GetColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\XList as ListColumnIndexes; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Logs\XList as ListTableLogs; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Delete as DeleteRows; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Update as UpdateRows; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Upsert as UpsertRows; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column\Decrement as DecrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column\Increment as IncrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Create as CreateRow; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Delete as DeleteRow; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Get as GetRow; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Logs\XList as ListRowLogs; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Update as UpdateRow; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Upsert as UpsertRow; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\XList as ListRows; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Update as UpdateTable; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Usage\Get as GetTableUsage; -use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\XList as ListTables; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Create as CreateTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Delete as DeleteTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Get as GetTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean\Create as CreateBoolean; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Boolean\Update as UpdateBoolean; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime\Create as CreateDatetime; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Datetime\Update as UpdateDatetime; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Delete as DeleteColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email\Create as CreateEmail; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Email\Update as UpdateEmail; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum\Create as CreateEnum; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Enum\Update as UpdateEnum; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float\Create as CreateFloat; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Float\Update as UpdateFloat; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Get as GetColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer\Create as CreateInteger; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Integer\Update as UpdateInteger; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP\Create as CreateIP; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\IP\Update as UpdateIP; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship\Create as CreateRelationship; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\Relationship\Update as UpdateRelationship; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String\Create as CreateString; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\String\Update as UpdateString; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL\Create as CreateURL; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\URL\Update as UpdateURL; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Columns\XList as ListColumns; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Create as CreateTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Delete as DeleteTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Get as GetTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Create as CreateColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Delete as DeleteColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\Get as GetColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Indexes\XList as ListColumnIndexes; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Delete as DeleteRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Update as UpdateRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Bulk\Upsert as UpsertRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column\Decrement as DecrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Column\Increment as IncrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Create as CreateRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Delete as DeleteRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Get as GetRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Logs\XList as ListRowLogs; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Update as UpdateRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\Upsert as UpsertRow; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Rows\XList as ListRows; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Update as UpdateTable; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\Usage\Get as GetTableUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Tables\XList as ListTables; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Update as UpdateTablesDatabase; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage\Get as GetTablesDatabaseUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage\XList as ListTablesDatabaseUsage; +use Appwrite\Platform\Modules\Databases\Http\TablesDB\XList as ListTablesDatabase; use Utopia\Platform\Service; /** @@ -63,12 +70,24 @@ class Tables extends Base { protected function register(Service $service): void { + $this->registerDatabaseActions($service); $this->registerTableActions($service); $this->registerColumnActions($service); $this->registerIndexActions($service); $this->registerRowActions($service); } + private function registerDatabaseActions(Service $service): void + { + $service->addAction(CreateTablesDatabase::getName(), new CreateTablesDatabase()); + $service->addAction(GetTablesDatabase::getName(), new GetTablesDatabase()); + $service->addAction(UpdateTablesDatabase::getName(), new UpdateTablesDatabase()); + $service->addAction(DeleteTablesDatabase::getName(), new DeleteTablesDatabase()); + $service->addAction(ListTablesDatabase::getName(), new ListTablesDatabase()); + $service->addAction(GetTablesDatabaseUsage::getName(), new GetTablesDatabaseUsage()); + $service->addAction(ListTablesDatabaseUsage::getName(), new ListTablesDatabaseUsage()); + } + private function registerTableActions(Service $service): void { $service->addAction(CreateTable::getName(), new CreateTable()); diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 6ab0310e14..eed69b49ad 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -175,13 +175,12 @@ abstract class Format break; case 'databases': switch ($method) { - /*case 'getUsage':*/ + case 'getUsage': case 'listUsage': case 'getCollectionUsage': - case 'getDatabaseUsage': switch ($param) { case 'range': - return 'DatabaseUsageRange'; + return 'UsageRange'; } break; case 'createRelationshipAttribute': @@ -207,14 +206,14 @@ abstract class Format } } break; - case 'grids': + case 'tablesDb': switch ($method) { - case 'getDatabaseUsage': - case 'listDatabaseUsage': + case 'getUsage': + case 'listUsage': case 'getTableUsage': switch ($param) { case 'range': - return 'GridUsageRange'; + return 'UsageRange'; } break; case 'createRelationshipColumn': @@ -246,7 +245,7 @@ abstract class Format case 'listUsage': switch ($param) { case 'range': - return 'FunctionUsageRange'; + return 'UsageRange'; } break; case 'createExecution': @@ -281,7 +280,7 @@ abstract class Format case 'listUsage': switch ($param) { case 'range': - return 'SiteUsageRange'; + return 'UsageRange'; } break; case 'createVcsDeployment': @@ -404,7 +403,7 @@ abstract class Format case 'getBucketUsage': switch ($param) { case 'range': - return 'StorageUsageRange'; + return 'UsageRange'; } break; case 'getFilePreview': @@ -422,7 +421,7 @@ abstract class Format case 'getUsage': switch ($param) { case 'range': - return 'UserUsageRange'; + return 'UsageRange'; } break; case 'createMfaAuthenticator': @@ -479,18 +478,17 @@ abstract class Format break; case 'databases': switch ($method) { - /*case 'getUsage':*/ + case 'getUsage': case 'listUsage': case 'getCollectionUsage': - case 'getDatabaseUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; - case 'grids': + case 'tablesDb': switch ($method) { - case 'getDatabaseUsage': - case 'listDatabaseUsage': + case 'getUsage': + case 'listUsage': case 'getTableUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index e9933f4a25..4bc8093187 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -216,13 +216,13 @@ class OpenAPI3 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), 'namespace' => $methodObj->getNamespace(), - 'desc' => $method->getDesc() ?? '', + 'desc' => $methodObj->getDesc() ?? '', 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], 'responses' => [], 'description' => ($desc) ? \file_get_contents($desc) : '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method->getMethodName()) . '.md', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodObj->getMethodName()) . '.md', ]; // add deprecation only if method has it! diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index db561650d8..225ede4f00 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -225,11 +225,13 @@ class Swagger2 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), 'namespace' => $methodObj->getNamespace(), + 'desc' => $methodObj->getDesc() ?? '', 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], 'responses' => [], 'description' => ($desc) ? \file_get_contents($desc) : '', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodObj->getMethodName()) . '.md', ]; // add deprecation only if method has it! diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index b7750feccd..77df48ce89 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -80,13 +80,6 @@ class Row extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); - $collectionId = $document->getAttribute('$collectionId', ''); - if (!empty($collectionId)) { - $document - ->removeAttribute('$collectionId') - ->setAttribute('$tableId', $collectionId); - } - foreach ($document->getAttributes() as $column) { if (\is_array($column)) { foreach ($column as $subAttribute) { diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 090f1faec7..12c90f9c8b 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -713,7 +713,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables', + '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -742,7 +742,7 @@ class UsageTest extends Scope if ($i < (self::CREATE / 2)) { $response = $this->client->call( Client::METHOD_DELETE, - '/databases/' . $databaseId . '/grids/tables/' . $tableId, + '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), @@ -757,7 +757,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns' . '/string', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns' . '/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -780,7 +780,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -802,7 +802,7 @@ class UsageTest extends Scope if ($i < (self::CREATE / 2)) { $response = $this->client->call( Client::METHOD_DELETE, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), @@ -898,7 +898,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/usage?range=30d', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/usage?range=30d', $this->getConsoleHeaders() ); diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 1153f7ead7..718d69197e 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -32,7 +32,7 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('grids', $database['body']['type']); + $this->assertEquals('tablesdb', $database['body']['type']); // testing to create a database with type $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php similarity index 82% rename from tests/e2e/Services/Databases/Grids/DatabasesBase.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 2f300e7788..8cd9e30708 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -32,10 +32,10 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('grids', $database['body']['type']); + $this->assertEquals('tablesdb', $database['body']['type']); // testing to create a database with type - $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + $database2 = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -46,7 +46,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $database2['headers']['status-code']); - $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + $database2 = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -63,7 +63,7 @@ trait DatabasesBase // cleanup(for database2) $databaseId = $database2['body']['$id']; - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -83,7 +83,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -99,7 +99,7 @@ trait DatabasesBase $this->assertEquals(201, $movies['headers']['status-code']); $this->assertEquals($movies['body']['name'], 'Movies'); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -135,7 +135,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', + '/tablesdb/console/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -148,7 +148,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', + '/tablesdb/console/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', // 'x-appwrite-project' => '', empty header @@ -167,7 +167,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -181,7 +181,7 @@ trait DatabasesBase $this->assertFalse($response['body']['enabled']); if ($this->getSide() === 'client') { - $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseCreateRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -196,24 +196,24 @@ trait DatabasesBase ], ]); - $this->assertEquals(404, $responseCreateDocument['headers']['status-code']); + $this->assertEquals(404, $responseCreateRow['headers']['status-code']); - $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseListRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(404, $responseListDocument['headers']['status-code']); + $this->assertEquals(404, $responseListRow['headers']['status-code']); - $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ + $responseGetRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(404, $responseGetDocument['headers']['status-code']); + $this->assertEquals(404, $responseGetRow['headers']['status-code']); } - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -234,7 +234,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -244,7 +244,7 @@ trait DatabasesBase 'required' => true, ]); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -255,7 +255,7 @@ trait DatabasesBase 'default' => '', ]); - $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $tagline = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -266,7 +266,7 @@ trait DatabasesBase 'default' => '', ]); - $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $releaseYear = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -277,7 +277,7 @@ trait DatabasesBase 'max' => 2200, ]); - $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $duration = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -287,7 +287,7 @@ trait DatabasesBase 'min' => 60, ]); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -298,7 +298,7 @@ trait DatabasesBase 'array' => true, ]); - $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ + $datetime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -307,7 +307,7 @@ trait DatabasesBase 'required' => false, ]); - $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ + $relationship = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -319,7 +319,7 @@ trait DatabasesBase 'twoWayKey' => 'movie' ]); - $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $integers = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -391,7 +391,7 @@ trait DatabasesBase // wait for database worker to create attributes sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -418,7 +418,7 @@ trait DatabasesBase public function testListColumns(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -431,7 +431,7 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, \count($response['body']['columns'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -449,7 +449,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -465,7 +465,7 @@ trait DatabasesBase $this->assertEquals(201, $table['headers']['status-code']); $this->assertEquals($table['body']['name'], 'patch'); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -479,7 +479,7 @@ trait DatabasesBase sleep(1); - $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/'.$databaseId.'/tables/'.$table['body']['$id'].'/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -493,9 +493,9 @@ trait DatabasesBase sleep(1); /** - * Update attribute size to exceed Index maximum length + * Update column size to exceed Index maximum length */ - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/tablesdb/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -511,7 +511,7 @@ trait DatabasesBase public function testUpdateColumnEnum(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -520,7 +520,7 @@ trait DatabasesBase 'name' => 'Test Database 2' ]); - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $database['body']['$id'] . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -533,8 +533,8 @@ trait DatabasesBase ], ]); - // Create enum attribute - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ + // Create enum column + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -551,8 +551,8 @@ trait DatabasesBase \sleep(2); - // Update enum attribute - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ + // Update enum column + $attribute = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -572,7 +572,7 @@ trait DatabasesBase public function testColumnResponseModels(array $data): array { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -588,7 +588,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $columnsPath = "/databases/" . $databaseId . "/grids/tables/{$tableId}/columns"; + $columnsPath = "/tablesdb/" . $databaseId . "/tables/{$tableId}/columns"; $string = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -989,7 +989,7 @@ trait DatabasesBase $this->assertEquals($relationship['body']['twoWay'], $relationshipResponse['body']['twoWay']); $this->assertEquals($relationship['body']['twoWayKey'], $relationshipResponse['body']['twoWayKey']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1101,7 +1101,7 @@ trait DatabasesBase $this->assertEquals($integersResponse['body']['min'], $columns[11]['min']); $this->assertEquals($integersResponse['body']['max'], $columns[11]['max']); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1216,7 +1216,7 @@ trait DatabasesBase /** * Test for FAILURE */ - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1240,7 +1240,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $titleIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1256,7 +1256,7 @@ trait DatabasesBase $this->assertCount(1, $titleIndex['body']['columns']); $this->assertEquals('title', $titleIndex['body']['columns'][0]); - $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1272,7 +1272,7 @@ trait DatabasesBase $this->assertCount(1, $releaseYearIndex['body']['columns']); $this->assertEquals('releaseYear', $releaseYearIndex['body']['columns'][0]); - $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1290,7 +1290,7 @@ trait DatabasesBase $this->assertEquals('$createdAt', $releaseWithDate1['body']['columns'][1]); $this->assertEquals('$updatedAt', $releaseWithDate1['body']['columns'][2]); - $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1307,7 +1307,7 @@ trait DatabasesBase $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); // Test for failure - $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1320,7 +1320,7 @@ trait DatabasesBase $this->assertEquals(400, $fulltextReleaseYear['headers']['status-code']); $this->assertEquals($fulltextReleaseYear['body']['message'], 'Attribute "releaseYear" cannot be part of a FULLTEXT index, must be of type string'); - $noAttributes = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $noAttributes = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1333,7 +1333,7 @@ trait DatabasesBase $this->assertEquals(400, $noAttributes['headers']['status-code']); $this->assertEquals($noAttributes['body']['message'], 'No attributes provided for index'); - $duplicates = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $duplicates = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1346,7 +1346,7 @@ trait DatabasesBase $this->assertEquals(400, $duplicates['headers']['status-code']); $this->assertEquals($duplicates['body']['message'], 'Duplicate attributes provided'); - $tooLong = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $tooLong = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1359,7 +1359,7 @@ trait DatabasesBase $this->assertEquals(400, $tooLong['headers']['status-code']); $this->assertStringContainsString('Index length is longer than the maximum', $tooLong['body']['message']); - $fulltextArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1372,7 +1372,7 @@ trait DatabasesBase $this->assertEquals(400, $fulltextArray['headers']['status-code']); $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); - $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $actorsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1384,7 +1384,7 @@ trait DatabasesBase $this->assertEquals(202, $actorsArray['headers']['status-code']); - $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1397,7 +1397,7 @@ trait DatabasesBase $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); - $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $unknown = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1410,27 +1410,27 @@ trait DatabasesBase $this->assertEquals(400, $unknown['headers']['status-code']); $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ 'key' => 'integers-order', 'type' => 'key', - 'columns' => ['integers'], // array attribute + 'columns' => ['integers'], // array column 'orders' => ['DESC'], // Check order is removed in API ]); $this->assertEquals(202, $index1['headers']['status-code']); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ 'key' => 'integers-size', 'type' => 'key', - 'columns' => ['integers'], // array attribute + 'columns' => ['integers'], // array column ]); $this->assertEquals(202, $index2['headers']['status-code']); @@ -1440,7 +1440,7 @@ trait DatabasesBase */ sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1468,7 +1468,7 @@ trait DatabasesBase $tableId = $data['moviesId']; // Test case for valid lengths - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1481,7 +1481,7 @@ trait DatabasesBase $this->assertEquals(202, $create['headers']['status-code']); // Fetch index and check correct lengths - $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes/lengthTestIndex", [ + $index = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes/lengthTestIndex", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1491,7 +1491,7 @@ trait DatabasesBase $this->assertEquals([128, 200], $index['body']['lengths']); // Test case for count of lengths greater than attributes (should throw 400) - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1504,7 +1504,7 @@ trait DatabasesBase $this->assertEquals(400, $create['headers']['status-code']); // Test case for lengths exceeding total of 768 - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1518,7 +1518,7 @@ trait DatabasesBase $this->assertEquals(400, $create['headers']['status-code']); // Test case for negative length values - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1537,7 +1537,7 @@ trait DatabasesBase public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1549,7 +1549,7 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, \count($response['body']['indexes'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1568,7 +1568,7 @@ trait DatabasesBase public function testCreateRow(array $data): array { $databaseId = $data['databaseId']; - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1589,7 +1589,7 @@ trait DatabasesBase ] ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1612,7 +1612,7 @@ trait DatabasesBase ] ]); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1635,7 +1635,7 @@ trait DatabasesBase ] ]); - $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1706,7 +1706,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $rowId = ID::unique(); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1723,14 +1723,14 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertCount(3, $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals('Thor: Ragnarok', $row['body']['title']); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1748,7 +1748,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1756,7 +1756,7 @@ trait DatabasesBase $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); // removing permission to read and delete - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1769,7 +1769,7 @@ trait DatabasesBase ], ]); // shouldn't be able to read as no read permission - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1782,7 +1782,7 @@ trait DatabasesBase break; } // shouldn't be able to delete as no delete permission - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1792,7 +1792,7 @@ trait DatabasesBase $this->assertEquals(401, $row['headers']['status-code']); } // giving the delete permission - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1807,14 +1807,14 @@ trait DatabasesBase ], ]); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(204, $row['headers']['status-code']); // relationship behaviour - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1832,7 +1832,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1850,7 +1850,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1862,7 +1862,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1876,7 +1876,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1892,7 +1892,7 @@ trait DatabasesBase // upserting values $rowId = ID::unique(); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1915,7 +1915,7 @@ trait DatabasesBase ]); $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1929,7 +1929,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1953,7 +1953,7 @@ trait DatabasesBase // data should get updated $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1967,7 +1967,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $rows['body']['rows'][0]['library']['libraryName']); // data should get added - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1991,7 +1991,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2003,7 +2003,7 @@ trait DatabasesBase $this->assertEquals(2, $rows['body']['total']); // test without passing permissions - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2016,7 +2016,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('Thor: Ragnarok', $row['body']['title']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2024,7 +2024,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2033,10 +2033,10 @@ trait DatabasesBase $this->assertEquals(204, $deleteResponse['headers']['status-code']); if ($this->getSide() === 'client') { - // Skipped on server side: Creating a document with no permissions results in an empty permissions array, whereas on client side it assigns permissions to the current user + // Skipped on server side: Creating a row with no permissions results in an empty permissions array, whereas on client side it assigns permissions to the current user // test without passing permissions - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2046,10 +2046,10 @@ trait DatabasesBase ] ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertCount(3, $document['body']['$permissions']); - $permissionsCreated = $document['body']['$permissions']; + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertCount(3, $row['body']['$permissions']); + $permissionsCreated = $row['body']['$permissions']; // checking the default created permission $defaultPermission = [ Permission::read(Role::user($this->getUser()['$id'])), @@ -2059,15 +2059,15 @@ trait DatabasesBase // ignoring the order of the permission and checking the permissions $this->assertEqualsCanonicalizing($defaultPermission, $permissionsCreated); - $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); - $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals(200, $row['headers']['status-code']); // updating the created doc - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2076,14 +2076,14 @@ trait DatabasesBase 'releaseYear' => 2002 ] ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertEquals(2002, $document['body']['releaseYear']); - $this->assertCount(3, $document['body']['$permissions']); - $this->assertEquals($permissionsCreated, $document['body']['$permissions']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(3, $row['body']['$permissions']); + $this->assertEquals($permissionsCreated, $row['body']['$permissions']); // removing the delete permission - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2095,12 +2095,12 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])) ] ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertEquals(2002, $document['body']['releaseYear']); - $this->assertCount(1, $document['body']['$permissions']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(1, $row['body']['$permissions']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -2108,7 +2108,7 @@ trait DatabasesBase $this->assertEquals(401, $deleteResponse['headers']['status-code']); // giving the delete permission - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2121,22 +2121,22 @@ trait DatabasesBase Permission::delete(Role::user($this->getUser()['$id'])) ] ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertEquals(2002, $document['body']['releaseYear']); - $this->assertCount(2, $document['body']['$permissions']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + $this->assertEquals(2002, $row['body']['releaseYear']); + $this->assertCount(2, $row['body']['$permissions']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); $this->assertEquals(204, $deleteResponse['headers']['status-code']); - // upsertion for the related document without passing permissions + // upsert for the related row without passing permissions // data should get added $newPersonId = ID::unique(); - $personNoPerm = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/' . $newPersonId, array_merge([ + $personNoPerm = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $newPersonId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2151,7 +2151,7 @@ trait DatabasesBase $this->assertEquals('Library 3', $personNoPerm['body']['library']['libraryName']); $this->assertCount(3, $personNoPerm['body']['library']['$permissions']); $this->assertCount(3, $personNoPerm['body']['$permissions']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2159,22 +2159,22 @@ trait DatabasesBase Query::select(['fullName', 'library.*'])->toString() ], ]); - $this->assertGreaterThanOrEqual(1, $documents['body']['total']); - $documentsDetails = $documents['body']['documents']; - foreach ($documentsDetails as $doc) { + $this->assertGreaterThanOrEqual(1, $rows['body']['total']); + $rowsDetails = $rows['body']['rows']; + foreach ($rowsDetails as $doc) { $this->assertCount(3, $doc['$permissions']); } $found = false; - foreach ($documents['body']['documents'] as $doc) { + foreach ($rows['body']['rows'] as $doc) { if (isset($doc['library']['libraryName']) && $doc['library']['libraryName'] === 'Library 3') { $found = true; break; } } - $this->assertTrue($found, 'Library 3 should be present in the upserted documents.'); + $this->assertTrue($found, 'Library 3 should be present in the upserted rows.'); // Fetch the related library and assert on its permissions (should be default/inherited) - $library3 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $library['body']['$id'] . '/documents/library3', array_merge([ + $library3 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/rows/library3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2193,7 +2193,7 @@ trait DatabasesBase public function testListRows(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2217,7 +2217,7 @@ trait DatabasesBase $this->assertEquals($data['moviesId'], $row['$tableId']); } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2232,8 +2232,8 @@ trait DatabasesBase $this->assertEquals(2019, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(3, $rows['body']['rows']); - // changing description attribute to be null by default instead of empty string - $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ + // changing description column to be null by default instead of empty string + $patchNull = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2243,7 +2243,7 @@ trait DatabasesBase ]); // creating a dummy doc with null description - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2260,7 +2260,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); // fetching docs with cursor after the dummy doc with order attr description which is null - $rowsPaginated = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rowsPaginated = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2273,7 +2273,7 @@ trait DatabasesBase $this->assertEquals(400, $rowsPaginated['headers']['status-code']); // deleting the dummy doc created - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2287,7 +2287,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; foreach ($data['rows'] as $row) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2314,7 +2314,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; $row = $data['rows'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2338,7 +2338,7 @@ trait DatabasesBase /** * Test after without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2349,7 +2349,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2363,7 +2363,7 @@ trait DatabasesBase $this->assertEquals($base['body']['rows'][2]['$id'], $rows['body']['rows'][1]['$id']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2378,7 +2378,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2393,7 +2393,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2410,7 +2410,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2425,7 +2425,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2442,7 +2442,7 @@ trait DatabasesBase /** * Test after with unknown row. */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2457,7 +2457,7 @@ trait DatabasesBase * Test null value for cursor */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2480,7 +2480,7 @@ trait DatabasesBase /** * Test before without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2491,7 +2491,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2505,7 +2505,7 @@ trait DatabasesBase $this->assertEquals($base['body']['rows'][1]['$id'], $rows['body']['rows'][1]['$id']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2520,7 +2520,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2535,7 +2535,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2552,7 +2552,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2567,7 +2567,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2590,7 +2590,7 @@ trait DatabasesBase public function testListRowsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2604,7 +2604,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2629,7 +2629,7 @@ trait DatabasesBase public function testRowsListQueries(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2642,7 +2642,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2655,7 +2655,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2668,7 +2668,7 @@ trait DatabasesBase $this->assertEquals(2017, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2682,7 +2682,7 @@ trait DatabasesBase $this->assertEquals(2017, $rows['body']['rows'][1]['releaseYear']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2694,7 +2694,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Syntax error', $rows['body']['message']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2706,7 +2706,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(2, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2718,7 +2718,7 @@ trait DatabasesBase $this->assertCount(1, $rows['body']['rows']); $this->assertEquals('Captain America', $rows['body']['rows'][0]['title']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2731,7 +2731,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Far From Home', $rows['body']['rows'][0]['title']); $this->assertEquals('Spider-Man: Homecoming', $rows['body']['rows'][1]['title']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2742,7 +2742,7 @@ trait DatabasesBase $this->assertCount(3, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2753,7 +2753,7 @@ trait DatabasesBase $this->assertCount(0, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2765,7 +2765,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(3, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2777,7 +2777,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(0, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2789,7 +2789,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Query value is invalid for attribute "birthDay"', $rows['body']['message']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2803,7 +2803,7 @@ trait DatabasesBase $this->assertEquals('1975-06-12T18:12:55.000+00:00', $rows['body']['rows'][1]['birthDay']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2824,7 +2824,7 @@ trait DatabasesBase $conditions[] = $i; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2841,7 +2841,7 @@ trait DatabasesBase $value .= "[" . $i . "] Too long title to cross 2k chars query limit "; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2854,7 +2854,7 @@ trait DatabasesBase //$this->assertEquals(400, $rows['headers']['status-code']); // Todo: Disabled for CL - Uncomment after ProxyDatabase cleanup for find method - // $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + // $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ // 'content-type' => 'application/json', // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders()), [ @@ -2874,7 +2874,7 @@ trait DatabasesBase public function testUpdateRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2907,7 +2907,7 @@ trait DatabasesBase $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2932,7 +2932,7 @@ trait DatabasesBase $this->assertContains(Permission::update(Role::users()), $row['body']['$permissions']); $this->assertContains(Permission::delete(Role::users()), $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2946,7 +2946,7 @@ trait DatabasesBase $this->assertEquals($row['body']['title'], 'Thor: Ragnarok'); $this->assertEquals($row['body']['releaseYear'], 2017); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::now()), @@ -2962,7 +2962,7 @@ trait DatabasesBase * Test for failure */ - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => 'invalid', @@ -2976,7 +2976,7 @@ trait DatabasesBase $this->assertEquals('Invalid X-Appwrite-Timestamp header value', $response['body']['message']); $this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -1000)), @@ -2999,7 +2999,7 @@ trait DatabasesBase public function testDeleteRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3021,21 +3021,21 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(200, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(204, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3053,19 +3053,19 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'InvalidDocumentDatabase', + 'name' => 'InvalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('InvalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), - 'name' => 'invalidDocumentStructure', + 'name' => 'invalidRowStructure', 'permissions' => [ Permission::create(Role::any()), Permission::read(Role::any()), @@ -3074,11 +3074,11 @@ trait DatabasesBase ]); $this->assertEquals(201, $table['headers']['status-code']); - $this->assertEquals('invalidDocumentStructure', $table['body']['name']); + $this->assertEquals('invalidRowStructure', $table['body']['name']); $tableId = $table['body']['$id']; - $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ + $email = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3087,7 +3087,7 @@ trait DatabasesBase 'required' => false, ]); - $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3097,7 +3097,7 @@ trait DatabasesBase 'required' => false, ]); - $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ + $ip = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3106,7 +3106,7 @@ trait DatabasesBase 'required' => false, ]); - $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ + $url = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3116,7 +3116,7 @@ trait DatabasesBase 'required' => false, ]); - $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $range = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3128,7 +3128,7 @@ trait DatabasesBase ]); // TODO@kodumbeats min and max are rounded in error message - $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $floatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3139,7 +3139,7 @@ trait DatabasesBase 'max' => 1.4, ]); - $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $probability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3151,7 +3151,7 @@ trait DatabasesBase 'max' => 1, ]); - $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $upperBound = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3161,7 +3161,7 @@ trait DatabasesBase 'max' => 10, ]); - $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $lowerBound = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3175,7 +3175,7 @@ trait DatabasesBase * Test for failure */ - $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $invalidRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3185,7 +3185,7 @@ trait DatabasesBase 'max' => 3, ]); - $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3195,7 +3195,7 @@ trait DatabasesBase 'array' => true, ]); - $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultRequired = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3205,7 +3205,7 @@ trait DatabasesBase 'default' => 12 ]); - $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefault = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3215,7 +3215,7 @@ trait DatabasesBase 'default' => 'south' ]); - $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3225,7 +3225,7 @@ trait DatabasesBase 'default' => 'NORTH' ]); - $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $goodDatetime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3235,7 +3235,7 @@ trait DatabasesBase 'default' => null ]); - $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $datetimeDefault = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3267,7 +3267,7 @@ trait DatabasesBase // wait for worker to add attributes sleep(3); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -3279,7 +3279,7 @@ trait DatabasesBase * Test for successful validation */ - $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodEmail = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3294,7 +3294,7 @@ trait DatabasesBase ] ]); - $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3309,7 +3309,7 @@ trait DatabasesBase ] ]); - $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodIp = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3324,7 +3324,7 @@ trait DatabasesBase ] ]); - $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodUrl = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3339,7 +3339,7 @@ trait DatabasesBase ] ]); - $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3354,7 +3354,7 @@ trait DatabasesBase ] ]); - $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodFloatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3369,7 +3369,7 @@ trait DatabasesBase ] ]); - $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $goodProbability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3384,7 +3384,7 @@ trait DatabasesBase ] ]); - $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $notTooHigh = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3399,7 +3399,7 @@ trait DatabasesBase ] ]); - $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $notTooLow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3425,10 +3425,10 @@ trait DatabasesBase $this->assertEquals(201, $notTooLow['headers']['status-code']); /* - * Test that custom validators reject documents + * Test that custom validators reject rows */ - $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badEmail = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3443,7 +3443,7 @@ trait DatabasesBase ] ]); - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3458,7 +3458,7 @@ trait DatabasesBase ] ]); - $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badIp = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3473,7 +3473,7 @@ trait DatabasesBase ] ]); - $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badUrl = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3488,7 +3488,7 @@ trait DatabasesBase ] ]); - $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3503,7 +3503,7 @@ trait DatabasesBase ] ]); - $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badFloatRange = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3518,7 +3518,7 @@ trait DatabasesBase ] ]); - $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badProbability = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3533,7 +3533,7 @@ trait DatabasesBase ] ]); - $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $tooHigh = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3548,7 +3548,7 @@ trait DatabasesBase ] ]); - $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $tooLow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3563,7 +3563,7 @@ trait DatabasesBase ] ]); - $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $badTime = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3604,7 +3604,7 @@ trait DatabasesBase public function testDefaultPermissions(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3637,7 +3637,7 @@ trait DatabasesBase // Updated Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3665,7 +3665,7 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])), ], $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3682,7 +3682,7 @@ trait DatabasesBase // Reset Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3701,7 +3701,7 @@ trait DatabasesBase $this->assertEquals([], $row['body']['$permissions']); // Check client side can no longer read the row. - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3726,20 +3726,20 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'EnforceCollectionAndDocumentPermissions', + 'name' => 'EnforceCollectionAndRowPermissions', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('EnforceCollectionAndDocumentPermissions', $database['body']['name']); + $this->assertEquals('EnforceCollectionAndRowPermissions', $database['body']['name']); $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), - 'name' => 'enforceCollectionAndDocumentPermissions', + 'name' => 'enforceCollectionAndRowPermissions', 'rowSecurity' => true, 'permissions' => [ Permission::read(Role::user($user)), @@ -3750,30 +3750,30 @@ trait DatabasesBase ]); $this->assertEquals(201, $table['headers']['status-code']); - $this->assertEquals($table['body']['name'], 'enforceCollectionAndDocumentPermissions'); + $this->assertEquals($table['body']['name'], 'enforceCollectionAndRowPermissions'); $this->assertEquals($table['body']['rowSecurity'], true); $tableId = $table['body']['$id']; sleep(2); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute', + 'key' => 'column', 'size' => 64, 'required' => true, ]); $this->assertEquals(202, $attribute['headers']['status-code'], 202); - $this->assertEquals('attribute', $attribute['body']['key']); + $this->assertEquals('column', $attribute['body']['key']); - // wait for db to add attribute + // wait for db to add column sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3786,16 +3786,16 @@ trait DatabasesBase $this->assertEquals(202, $index['headers']['status-code']); $this->assertEquals('key_attribute', $index['body']['key']); - // wait for db to add attribute + // wait for db to add column sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user($user)), @@ -3806,13 +3806,13 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::update(Role::user($user)), @@ -3822,14 +3822,14 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user(ID::custom('other'))), @@ -3839,7 +3839,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3848,7 +3848,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3879,7 +3879,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithRowRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3887,9 +3887,9 @@ trait DatabasesBase ]); // Current user has no table permissions but has read permission for this row - $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); + $this->assertEquals(200, $row3GetWithRowRead['headers']['status-code']); - $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ + $row2GetFailure = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3899,7 +3899,7 @@ trait DatabasesBase // Current user has no table or row permissions for this row $this->assertEquals(404, $row2GetFailure['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3926,7 +3926,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3947,22 +3947,22 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute', + 'key' => 'column', 'size' => 64, 'required' => true, ]); $this->assertEquals(202, $attribute['headers']['status-code'], 202); - $this->assertEquals('attribute', $attribute['body']['key']); + $this->assertEquals('column', $attribute['body']['key']); \sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3977,13 +3977,13 @@ trait DatabasesBase \sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user($user)), @@ -3994,13 +3994,13 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::update(Role::user($user)), @@ -4010,14 +4010,14 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ 'rowId' => ID::unique(), 'data' => [ - 'attribute' => 'one', + 'column' => 'one', ], 'permissions' => [ Permission::read(Role::user(ID::custom('other2'))), @@ -4027,7 +4027,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4036,7 +4036,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4067,7 +4067,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithRowRead = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4075,9 +4075,9 @@ trait DatabasesBase ]); // other2 has no table permissions and row permissions are disabled - $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); + $this->assertEquals(404, $row3GetWithRowRead['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4088,7 +4088,7 @@ trait DatabasesBase $this->assertEquals(401, $rowsUser2['headers']['status-code']); // Enable row permissions - $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ + $this->client->call(CLient::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4097,7 @@ trait DatabasesBase 'rowSecurity' => true, ]); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4115,7 +4115,7 @@ trait DatabasesBase public function testUniqueIndexDuplicate(array $data): array { $databaseId = $data['databaseId']; - $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $uniqueIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4130,7 +4130,7 @@ trait DatabasesBase sleep(2); // test for failure - $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $duplicate = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4153,7 +4153,7 @@ trait DatabasesBase $this->assertEquals(409, $duplicate['headers']['status-code']); // Test for exception when updating row to conflict - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4176,7 +4176,7 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); // Test for exception when updating row to conflict - $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ + $duplicate = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4215,7 +4215,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows', $headers, [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows', $headers, [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', @@ -4231,7 +4231,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Updated Date Test', ] @@ -4245,7 +4245,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', '$createdAt' => '2022-08-01 13:09:23.040', @@ -4281,7 +4281,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create table - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4302,8 +4302,8 @@ trait DatabasesBase $moviesId = $movies['body']['$id']; - // create attribute - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ + // create column + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4319,7 +4319,7 @@ trait DatabasesBase sleep(2); // add row - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4343,7 +4343,7 @@ trait DatabasesBase $this->assertContains(Permission::delete(Role::any()), $row['body']['$permissions']); // Send only read permission - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4356,7 +4356,7 @@ trait DatabasesBase $this->assertCount(1, $row['body']['$permissions']); // Send only mutation permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4374,7 +4374,7 @@ trait DatabasesBase } // remove table - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $moviesId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $moviesId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4392,7 +4392,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4405,7 +4405,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $true = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4417,7 +4417,7 @@ trait DatabasesBase $this->assertEquals(202, $true['headers']['status-code']); - $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $false = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4437,7 +4437,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4455,7 +4455,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4472,7 +4472,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4484,7 +4484,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4498,7 +4498,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4516,7 +4516,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relation['body']['type']); $this->assertEquals('processing', $relation['body']['status']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4531,7 +4531,7 @@ trait DatabasesBase $this->assertEquals('person', $columns[1]['twoWayKey']); $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $columns[1]['onDelete']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4548,7 +4548,7 @@ trait DatabasesBase $this->assertEquals('person', $attribute['body']['twoWayKey']); $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $attribute['body']['onDelete']); - $person1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4572,7 +4572,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); // Create without nested ID - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4603,7 +4603,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$internalId', $person1['body']); $this->assertArrayNotHasKey('$internalId', $person1['body']['library']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4617,7 +4617,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); $this->assertArrayHasKey('fullName', $rows['body']['rows'][0]); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4629,7 +4629,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Cannot query nested attribute on: library', $rows['body']['message']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4639,7 +4639,7 @@ trait DatabasesBase $this->assertEquals(204, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4647,7 +4647,7 @@ trait DatabasesBase $this->assertEquals(404, $attribute['headers']['status-code']); - $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ + $person1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4655,7 +4655,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('library', $person1['body']); //Test Deletion of related twoKey - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4682,7 +4682,7 @@ trait DatabasesBase $libraryCollection = $data['libraryCollection']; // One person can own several libraries - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4696,7 +4696,7 @@ trait DatabasesBase sleep(1); - $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/columns', array_merge([ + $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4706,7 +4706,7 @@ trait DatabasesBase $this->assertEquals(2, $libraryAttributesResponse['body']['total']); $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['columns'][1]['key']); - $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection, array_merge([ + $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4715,7 +4715,7 @@ trait DatabasesBase $this->assertIsArray($libraryCollectionResponse['body']['columns']); $this->assertCount(2, $libraryCollectionResponse['body']['columns']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4732,7 +4732,7 @@ trait DatabasesBase $this->assertEquals('person_one_to_many', $attribute['body']['twoWayKey']); $this->assertEquals('restrict', $attribute['body']['onDelete']); - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4771,7 +4771,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $person2['body']); $this->assertEquals(2, count($person2['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4785,7 +4785,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $response['body']); $this->assertEquals(2, count($response['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/rows/library11', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4798,7 +4798,7 @@ trait DatabasesBase $this->assertArrayHasKey('person_one_to_many', $response['body']); $this->assertEquals('person10', $response['body']['person_one_to_many']['$id']); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4808,7 +4808,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4835,7 +4835,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create album table - $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $albums = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4849,8 +4849,8 @@ trait DatabasesBase ], ]); - // Create album name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ + // Create album name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4861,7 +4861,7 @@ trait DatabasesBase ]); // Create artist table - $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $artists = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4875,8 +4875,8 @@ trait DatabasesBase ], ]); - // Create artist name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ + // Create artist name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4887,7 +4887,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4917,7 +4917,7 @@ trait DatabasesBase ]; // Create album - $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows', array_merge([ + $album = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4939,7 +4939,7 @@ trait DatabasesBase $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals($permissions, $album['body']['artist']['$permissions']); - $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ + $album = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4955,7 +4955,7 @@ trait DatabasesBase $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals($permissions, $album['body']['artist']['$permissions']); - $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ + $artist = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4987,7 +4987,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create sports table - $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $sports = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5001,8 +5001,8 @@ trait DatabasesBase ], ]); - // Create sport name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ + // Create sport name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5013,7 +5013,7 @@ trait DatabasesBase ]); // Create player table - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5027,8 +5027,8 @@ trait DatabasesBase ], ]); - // Create player name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ + // Create player name column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5039,7 +5039,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5070,7 +5070,7 @@ trait DatabasesBase ]; // Create sport - $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows', array_merge([ + $sport = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5100,7 +5100,7 @@ trait DatabasesBase $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); - $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ + $sport = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5118,7 +5118,7 @@ trait DatabasesBase $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); - $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ + $player = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5147,7 +5147,7 @@ trait DatabasesBase */ public function testValidateOperators(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5166,7 +5166,7 @@ trait DatabasesBase $this->assertEquals('Stevie Wonder', $response['body']['rows'][0]['fullName']); $this->assertEquals(2, count($response['body']['rows'][0]['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5190,7 +5190,7 @@ trait DatabasesBase */ public function testSelectQueries(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5205,7 +5205,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5219,7 +5219,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $row); $this->assertArrayNotHasKey('$tableId', $row); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5240,7 +5240,7 @@ trait DatabasesBase public function testOrQueries(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5256,7 +5256,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $presidents = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5273,7 +5273,7 @@ trait DatabasesBase $this->assertEquals($presidents['body']['name'], 'USA Presidents'); // Create Attributes - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5284,7 +5284,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $firstName['headers']['status-code']); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5299,7 +5299,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5314,7 +5314,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5329,7 +5329,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5347,7 +5347,7 @@ trait DatabasesBase $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5376,7 +5376,7 @@ trait DatabasesBase public function testNotContains(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5392,7 +5392,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5409,7 +5409,7 @@ trait DatabasesBase $this->assertEquals($movies['body']['name'], 'Movies'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5420,7 +5420,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $genre = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ + $genre = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5435,7 +5435,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5450,7 +5450,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5465,7 +5465,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5484,7 +5484,7 @@ trait DatabasesBase // Test notContains query - should return movies that don't contain "Spider" in title $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5512,7 +5512,7 @@ trait DatabasesBase public function testNotSearch(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5528,7 +5528,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $books = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $books = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5545,7 +5545,7 @@ trait DatabasesBase $this->assertEquals($books['body']['name'], 'Books'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5556,7 +5556,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5570,7 +5570,7 @@ trait DatabasesBase \sleep(2); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/indexes', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5580,7 +5580,7 @@ trait DatabasesBase 'columns' => ['description'], ]); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5595,7 +5595,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5610,7 +5610,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5629,7 +5629,7 @@ trait DatabasesBase // Test notSearch query - should return books that don't have "space" in the description $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $books['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $books['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5654,7 +5654,7 @@ trait DatabasesBase public function testNotBetween(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5670,7 +5670,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $products = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $products = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5687,7 +5687,7 @@ trait DatabasesBase $this->assertEquals($products['body']['name'], 'Products'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5698,7 +5698,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $price = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/columns/float', array_merge([ + $price = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5712,7 +5712,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5727,7 +5727,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5742,7 +5742,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5761,7 +5761,7 @@ trait DatabasesBase // Test notBetween query - should return products NOT priced between 10 and 50 $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $products['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $products['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5786,7 +5786,7 @@ trait DatabasesBase public function testNotStartsWith(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5802,7 +5802,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $employees = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $employees = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5819,7 +5819,7 @@ trait DatabasesBase $this->assertEquals($employees['body']['name'], 'Employees'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5830,7 +5830,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $department = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ + $department = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5845,7 +5845,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5860,7 +5860,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5875,7 +5875,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5894,7 +5894,7 @@ trait DatabasesBase // Test notStartsWith query - should return employees whose names don't start with "John" $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $employees['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $employees['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5919,7 +5919,7 @@ trait DatabasesBase public function testNotEndsWith(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5935,7 +5935,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $files = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $files = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5952,7 +5952,7 @@ trait DatabasesBase $this->assertEquals($files['body']['name'], 'Files'); // Create Attributes - $filename = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ + $filename = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5963,7 +5963,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $filename['headers']['status-code']); - $type = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ + $type = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5978,13 +5978,13 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'filename' => 'document.pdf', + 'filename' => 'row.pdf', 'type' => 'PDF', ], 'permissions' => [ @@ -5993,7 +5993,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6008,7 +6008,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6027,7 +6027,7 @@ trait DatabasesBase // Test notEndsWith query - should return files that don't end with ".pdf" $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $files['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $files['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6052,7 +6052,7 @@ trait DatabasesBase public function testCreatedBefore(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6068,7 +6068,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $posts = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $posts = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6085,7 +6085,7 @@ trait DatabasesBase $this->assertEquals($posts['body']['name'], 'Posts'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6096,7 +6096,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $content = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ + $content = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6111,7 +6111,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6129,7 +6129,7 @@ trait DatabasesBase // Sleep to ensure different creation times sleep(1); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6150,7 +6150,7 @@ trait DatabasesBase // Sleep again sleep(1); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6169,7 +6169,7 @@ trait DatabasesBase // Test createdBefore query - should return posts created before the second post $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $posts['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $posts['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6193,7 +6193,7 @@ trait DatabasesBase public function testCreatedAfter(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6209,7 +6209,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $events = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $events = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6226,7 +6226,7 @@ trait DatabasesBase $this->assertEquals($events['body']['name'], 'Events'); // Create Attributes - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6237,7 +6237,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $name['headers']['status-code']); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6252,7 +6252,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6270,7 +6270,7 @@ trait DatabasesBase // Sleep to ensure different creation times sleep(1); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6291,7 +6291,7 @@ trait DatabasesBase // Sleep again sleep(1); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6310,7 +6310,7 @@ trait DatabasesBase // Test createdAfter query - should return events created after the second event $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $events['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $events['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6334,7 +6334,7 @@ trait DatabasesBase public function testUpdatedBefore(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6350,7 +6350,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $tasks = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tasks = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6368,7 +6368,7 @@ trait DatabasesBase $this->assertEquals($tasks['body']['name'], 'Tasks'); // Create Attributes - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6379,7 +6379,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $title['headers']['status-code']); - $status = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ + $status = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6394,7 +6394,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6411,7 +6411,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); $taskOneId = $row1['body']['$id']; - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6428,7 +6428,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); $taskTwoId = $row2['body']['$id']; - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6447,7 +6447,7 @@ trait DatabasesBase // Update first task sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskOneId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskOneId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6458,7 +6458,7 @@ trait DatabasesBase // Update second task and get its updated time sleep(1); - $updatedTaskTwo = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskTwoId, array_merge([ + $updatedTaskTwo = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskTwoId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6470,7 +6470,7 @@ trait DatabasesBase // Update third task sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows/' . $taskThreeId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows/' . $taskThreeId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6482,7 +6482,7 @@ trait DatabasesBase // Test updatedBefore query - should return tasks updated before the second task's update time $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $tasks['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tasks['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6507,7 +6507,7 @@ trait DatabasesBase public function testUpdatedAfter(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6523,7 +6523,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $orders = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $orders = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6541,7 +6541,7 @@ trait DatabasesBase $this->assertEquals($orders['body']['name'], 'Orders'); // Create Attributes - $orderNumber = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ + $orderNumber = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6552,7 +6552,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $orderNumber['headers']['status-code']); - $status = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ + $status = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6567,7 +6567,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6584,7 +6584,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); $orderOneId = $row1['body']['$id']; - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6601,7 +6601,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); $orderTwoId = $row2['body']['$id']; - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6620,7 +6620,7 @@ trait DatabasesBase // Update first order sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderOneId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderOneId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6631,7 +6631,7 @@ trait DatabasesBase // Update second order and get its updated time sleep(1); - $updatedOrderTwo = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderTwoId, array_merge([ + $updatedOrderTwo = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderTwoId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6643,7 +6643,7 @@ trait DatabasesBase // Update third order sleep(1); - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows/' . $orderThreeId, array_merge([ + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows/' . $orderThreeId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6655,7 +6655,7 @@ trait DatabasesBase // Test updatedAfter query - should return orders updated after the second order's update time $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/grids/tables/' . $orders['body']['$id'] . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $orders['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -6683,7 +6683,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6697,7 +6697,7 @@ trait DatabasesBase ], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6714,7 +6714,7 @@ trait DatabasesBase $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6724,7 +6724,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table2 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6734,7 +6734,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6747,27 +6747,27 @@ trait DatabasesBase sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ 'rowId' => ID::unique(), 'data' => [ - 'name' => 'Document 1', + 'name' => 'Row 1', 'collection2' => [ [ - 'name' => 'Document 2', + 'name' => 'Row 2', ], ], ], ]); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ 'data' => [ - 'name' => 'Document 1 Updated', + 'name' => 'Row 1 Updated', ], ]); @@ -6779,7 +6779,7 @@ trait DatabasesBase */ public function testTimeout(array $data): void { - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6799,7 +6799,7 @@ trait DatabasesBase 'databaseId' => $table['body']['databaseId'] ]; - $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/columns/string', array_merge([ + $longtext = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6813,7 +6813,7 @@ trait DatabasesBase $this->assertEquals($longtext['headers']['status-code'], 202); for ($i = 0; $i < 10; $i++) { - $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6829,7 +6829,7 @@ trait DatabasesBase ]); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timeout' => 1, @@ -6847,7 +6847,7 @@ trait DatabasesBase */ public function testIncrementColumn(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6857,7 +6857,7 @@ trait DatabasesBase ]); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6872,8 +6872,8 @@ trait DatabasesBase ]); $tableId = $table['body']['$id']; - // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + // Add integer column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6885,7 +6885,7 @@ trait DatabasesBase \sleep(3); // Create row with initial count = 5 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -6903,7 +6903,7 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Increment by default 1 - $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -6911,14 +6911,14 @@ trait DatabasesBase $this->assertEquals(6, $inc['body']['count']); // Verify count = 6 - $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId", array_merge([ + $get = $this->client->call(Client::METHOD_GET, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(6, $get['body']['count']); // Increment by custom value 4 - $inc2 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc2 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -6927,28 +6927,28 @@ trait DatabasesBase $this->assertEquals(200, $inc2['headers']['status-code']); $this->assertEquals(10, $inc2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId", array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(10, $get2['body']['count']); // Test max limit exceeded - $err = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['max' => 8]); $this->assertEquals(400, $err['headers']['status-code']); - // Test attribute not found - $notFound = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/unknown/increment", array_merge([ + // Test column not found + $notFound = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/unknown/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); $this->assertEquals(404, $notFound['headers']['status-code']); // Test decrement with value 0 - $inc3 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/increment", array_merge([ + $inc3 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -6959,7 +6959,7 @@ trait DatabasesBase public function testDecrementColumn(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6970,7 +6970,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6986,8 +6986,8 @@ trait DatabasesBase $tableId = $table['body']['$id']; - // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + // Add integer column + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6999,7 +6999,7 @@ trait DatabasesBase \sleep(2); // Create row with initial count = 10 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -7014,21 +7014,21 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Decrement by default 1 (count = 10 -> 9) - $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); $this->assertEquals(200, $dec['headers']['status-code']); $this->assertEquals(9, $dec['body']['count']); - $get = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(9, $get['body']['count']); // Decrement by custom value 3 (count 9 -> 6) - $dec2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec2 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -7037,28 +7037,28 @@ trait DatabasesBase $this->assertEquals(200, $dec2['headers']['status-code']); $this->assertEquals(6, $dec2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(6, $get2['body']['count']); // Test min limit exceeded - $err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['min' => 7]); $this->assertEquals(400, $err['headers']['status-code']); - // Test type error on non-numeric attribute - $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + // Test type error on non-numeric column + $typeErr = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['value' => 'not-a-number']); $this->assertEquals(400, $typeErr['headers']['status-code']); // Test decrement with value 0 - $inc3 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$rowId/count/decrement", array_merge([ + $inc3 = $this->client->call(Client::METHOD_PATCH, "/tablesdb/$databaseId/tables/$tableId/rows/$rowId/count/decrement", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php similarity index 81% rename from tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php index 32fe49b6fa..3cde767d50 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesConsoleClientTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -34,7 +34,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -55,7 +55,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database is disabled but can still create tables */ - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -65,7 +65,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertFalse($database['body']['enabled']); - $tvShows = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tvShows = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -83,7 +83,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when table is disabled but can still modify tables */ - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'], array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $movies['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -109,7 +109,7 @@ class DatabasesConsoleClientTest extends Scope */ $databaseId = $data['databaseId']; - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -131,7 +131,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database and table are disabled but can still call get table */ - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -156,7 +156,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test When database and table are disabled but can still call update table */ - $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -184,7 +184,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database and table are disabled but can still call delete table */ - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tvShowsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tvShowsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -203,7 +203,7 @@ class DatabasesConsoleClientTest extends Scope * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -216,7 +216,7 @@ class DatabasesConsoleClientTest extends Scope * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -245,7 +245,7 @@ class DatabasesConsoleClientTest extends Scope * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -254,7 +254,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/randomCollectionId/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/randomCollectionId/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -266,7 +266,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -289,7 +289,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -298,7 +298,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertIsArray($logs['body']['logs']); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -310,7 +310,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertLessThanOrEqual(1, count($logs['body']['logs'])); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -321,7 +321,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertIsArray($logs['body']['logs']); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php similarity index 75% rename from tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php index f07b648890..277771e2df 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -34,8 +34,8 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Collection aliases write to create, update, delete - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // table aliases write to create, update, delete + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -54,7 +54,7 @@ class DatabasesCustomClientTest extends Scope $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -69,7 +69,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); // Document aliases write to update, delete - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -91,7 +91,7 @@ class DatabasesCustomClientTest extends Scope */ // Document does not allow create permission - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -109,7 +109,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateWithoutPermission(): array { - // If document has been created by server and client tried to update it without adjusting permissions, permission validation should be skipped + // If row has been created by server and client tried to update it without adjusting permissions, permission validation should be skipped // As a part of preparation, we get ID of currently logged-in user $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ @@ -132,8 +132,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals('Test Database', $database['body']['name']); $databaseId = $database['body']['$id']; - // Create collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Create table + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -145,8 +145,8 @@ class DatabasesCustomClientTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - // Add attribute to collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/columns/string', array_merge([ + // Add column to table + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/permissionCheck/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -160,8 +160,8 @@ class DatabasesCustomClientTest extends Scope // Wait for database worker to finish creating attributes sleep(2); - // Creating document by server, give read permission to our user + some other user - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows', array_merge([ + // Creating row by server, give read permission to our user + some other user + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -180,9 +180,9 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); - // Update document + // Update row // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -193,8 +193,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); - // Get name of the document, should be the new one - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + // Get name of the row, should be the new one + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -202,8 +202,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals("AppwriteExpert", $response['body']['name']); // Cleanup to prevent collision with other tests - // Delete collection - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ + // Delete table + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -212,11 +212,11 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); - // Wait for database worker to finish deleting collection + // Wait for database worker to finish deleting table sleep(2); - // Make sure collection has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ + // Make sure table has been deleted + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -229,7 +229,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateTwoWayRelationship(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -241,8 +241,8 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 1 + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -258,8 +258,8 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 2 + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -277,8 +277,8 @@ class DatabasesCustomClientTest extends Scope \sleep(2); - // Creating two way relationship between collection 1 and collection 2 from collection 1 - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Creating two way relationship between table 1 and table 2 from table 1 + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -293,8 +293,8 @@ class DatabasesCustomClientTest extends Scope \sleep(3); - // Update relation from collection 2 to on delete restrict - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ + // Update relation from table 2 to on delete restrict + $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -303,7 +303,7 @@ class DatabasesCustomClientTest extends Scope ]); // Fetching attributes after updating relation to compare - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'], [ + $table1Attributes = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'], [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -319,7 +319,7 @@ class DatabasesCustomClientTest extends Scope public function testRelationshipSameTwoWayKey(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -330,7 +330,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -346,7 +346,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -364,7 +364,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -382,7 +382,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(202, $relation['headers']['status-code']); $this->assertEquals('same_key', $relation['body']['twoWayKey']); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -401,7 +401,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals('Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', $relation['body']['message']); // twoWayKey is null TwoWayKey is default - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -419,7 +419,7 @@ class DatabasesCustomClientTest extends Scope $this->assertArrayHasKey('twoWayKey', $relation['body']); // twoWayKey is null, TwoWayKey is default, second POST - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -437,7 +437,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(409, $relation['body']['code']); // RelationshipManyToMany - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -455,8 +455,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(202, $relation['headers']['status-code']); $this->assertArrayHasKey('twoWayKey', $relation['body']); - // Second RelationshipManyToMany on Same collections - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Second RelationshipManyToMany on Same tables + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -478,7 +478,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateWithoutRelationPermission(): void { $userId = $this->getUser()['$id']; - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -489,14 +489,14 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 1 + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection1'), - 'name' => ID::custom('collection1'), + 'tableId' => ID::custom('table1'), + 'name' => ID::custom('table1'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -505,27 +505,27 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + // Creating table 2 + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection2'), - 'name' => ID::custom('collection2'), + 'tableId' => ID::custom('table2'), + 'name' => ID::custom('table2'), 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] ]); - $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), - 'name' => ID::custom('collection3'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -534,26 +534,26 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection4'), - 'name' => ID::custom('collection4'), + 'tableId' => ID::custom('table4'), + 'name' => ID::custom('table4'), 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] ]); - $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table5 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection5'), - 'name' => ID::custom('collection5'), + 'tableId' => ID::custom('table5'), + 'name' => ID::custom('table5'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -562,8 +562,8 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating one to one relationship from collection 1 to colletion 2 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 1 to colletion 2 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -575,8 +575,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table2['body']['$id'] ]); - // Creating one to one relationship from collection 2 to colletion 3 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 2 to colletion 3 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -588,8 +588,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table3['body']['$id'] ]); - // Creating one to one relationship from collection 3 to colletion 4 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 3 to colletion 4 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -601,8 +601,8 @@ class DatabasesCustomClientTest extends Scope 'key' => $table4['body']['$id'] ]); - // Creating one to one relationship from collection 4 to colletion 5 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ + // Creating one to one relationship from table 4 to colletion 5 + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -614,7 +614,7 @@ class DatabasesCustomClientTest extends Scope 'key' => $table5['body']['$id'] ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -626,7 +626,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -638,7 +638,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -650,7 +650,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -662,7 +662,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -675,8 +675,8 @@ class DatabasesCustomClientTest extends Scope ]); \sleep(2); - // Creating parent document with a child reference to test the permissions - $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows', array_merge([ + // Creating parent row with a child reference to test the permissions + $parentDocument = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -704,8 +704,8 @@ class DatabasesCustomClientTest extends Scope ]); $this->assertEquals(201, $parentDocument['headers']['status-code']); - // This is the point of the test. We should not need any authorization permission to update the document with same data. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // This is the point of the test. We should not need any authorization permission to update the row with same data. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -733,14 +733,14 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals($parentDocument['body'], $response['body']); - // Giving update permission of collection 3 to user. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ + // Giving update permission of table 3 to user. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), - 'name' => ID::custom('collection3'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -751,7 +751,7 @@ class DatabasesCustomClientTest extends Scope ]); // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -777,10 +777,10 @@ class DatabasesCustomClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(11, $response['body'][$table2['body']['$id']]['collection3']['Rating']); + $this->assertEquals(11, $response['body'][$table2['body']['$id']]['table3']['Rating']); - // We should not be allowed to update the document as we do not have permission for collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should not be allowed to update the row as we do not have permission for table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -796,8 +796,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); - // We should not be allowed to update the document as we do not have permission for collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ + // We should not be allowed to update the row as we do not have permission for table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -808,14 +808,14 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); - // Removing update permission from collection 3. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ + // Removing update permission from table 3. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), - 'name' => ID::custom('collection3'), + 'tableId' => ID::custom('table3'), + 'name' => ID::custom('table3'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -824,14 +824,14 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Giving update permission to collection 2. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection2', array_merge([ + // Giving update permission to table 2. + $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/table2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection2'), - 'name' => ID::custom('collection2'), + 'tableId' => ID::custom('table2'), + 'name' => ID::custom('table2'), 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), @@ -841,13 +841,13 @@ class DatabasesCustomClientTest extends Scope ] ]); - // Creating collection 3 new document - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/rows', array_merge([ + // Creating table 3 new row + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::custom('collection3Doc1'), + 'rowId' => ID::custom('table3Doc1'), 'data' => [ 'Rating' => '20' ] @@ -855,8 +855,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); - // We should be allowed to link a new document from collection 3 to collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should be allowed to link a new row from table 3 to table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -864,7 +864,7 @@ class DatabasesCustomClientTest extends Scope 'Title' => 'Captain America', $table2['body']['$id'] => [ '$id' => ID::custom($table2['body']['$id']), - $table3['body']['$id'] => 'collection3Doc1', + $table3['body']['$id'] => 'table3Doc1', ] ] ]); @@ -872,8 +872,8 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); - // We should be allowed to link and create a new document from collection 3 to collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + // We should be allowed to link and create a new row from table 3 to table 2. + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -882,7 +882,7 @@ class DatabasesCustomClientTest extends Scope $table2['body']['$id'] => [ '$id' => ID::custom($table2['body']['$id']), $table3['body']['$id'] => [ - '$id' => ID::custom('collection3Doc2') + '$id' => ID::custom('table3Doc2') ], ] ] @@ -893,7 +893,7 @@ class DatabasesCustomClientTest extends Scope public function testModifyCreatedAtUpdatedAtSingleRow(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -904,7 +904,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -922,7 +922,7 @@ class DatabasesCustomClientTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -935,7 +935,7 @@ class DatabasesCustomClientTest extends Scope sleep(1); // Test 1: Try to create row with $createdAt - should return 400 - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -949,7 +949,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Test 2: Try to create row with $updatedAt - should return 400 - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -963,7 +963,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Test 3: Try to create row with both $createdAt and $updatedAt - should return 400 - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -978,7 +978,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Test 4: Create a valid row first - $validRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $validRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -992,7 +992,7 @@ class DatabasesCustomClientTest extends Scope $rowId = $validRow['body']['$id']; // Test 5: Try to update row with $createdAt - should return 400 - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1005,7 +1005,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Test 6: Try to update row with $updatedAt - should return 400 - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1018,7 +1018,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Test 7: Try to update row with both $createdAt and $updatedAt - should return 400 - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1032,13 +1032,13 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] diff --git a/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php similarity index 79% rename from tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php index d2c24ca2f1..d987019d7a 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -35,7 +35,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $test1['headers']['status-code']); $this->assertEquals('Test 1', $test1['body']['name']); - $test2 = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -46,7 +46,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $test2['headers']['status-code']); $this->assertEquals('Test 2', $test2['body']['name']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -57,7 +57,7 @@ class DatabasesCustomServerTest extends Scope $base = array_reverse($databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -68,7 +68,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -79,7 +79,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -90,7 +90,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(2, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -101,7 +101,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $databases['headers']['status-code']); $this->assertCount(1, $databases['body']['databases']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -115,7 +115,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Order */ - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -131,12 +131,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for After */ - $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -148,7 +148,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $databases['body']['databases']); $this->assertEquals($base['body']['databases'][1]['$id'], $databases['body']['databases'][0]['$id']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -163,12 +163,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for Before */ - $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -180,7 +180,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $databases['body']['databases']); $this->assertEquals($base['body']['databases'][0]['$id'], $databases['body']['databases'][0]['$id']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -195,7 +195,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Search */ - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -205,7 +205,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1, $databases['body']['total']); $this->assertEquals('first', $databases['body']['databases'][0]['$id']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -216,7 +216,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Test 1', $databases['body']['databases'][0]['name']); $this->assertEquals('Test 2', $databases['body']['databases'][1]['name']); - $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $databases = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -228,7 +228,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -240,7 +240,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // This database already exists - $response = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -262,7 +262,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for SUCCESS */ - $database = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -282,7 +282,7 @@ class DatabasesCustomServerTest extends Scope { $databaseId = $data['databaseId']; - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -296,7 +296,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($database['body']['enabled']); // Now update the database without the passing the enabled parameter - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + $database = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -316,7 +316,7 @@ class DatabasesCustomServerTest extends Scope { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -326,7 +326,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals("", $response['body']); // Try to get the database and check if it has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -336,7 +336,7 @@ class DatabasesCustomServerTest extends Scope public function testListTables(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -352,7 +352,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for SUCCESS */ - $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -368,7 +368,7 @@ class DatabasesCustomServerTest extends Scope 'rowSecurity' => true, ]); - $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -384,7 +384,7 @@ class DatabasesCustomServerTest extends Scope 'rowSecurity' => true, ]); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -397,7 +397,7 @@ class DatabasesCustomServerTest extends Scope $base = array_reverse($tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -409,7 +409,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(1, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -421,7 +421,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(1, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -433,7 +433,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(2, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -448,7 +448,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Order */ - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -464,12 +464,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for After */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -481,7 +481,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $tables['body']['tables']); $this->assertEquals($base['body']['tables'][1]['$id'], $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -496,12 +496,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for Before */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -513,7 +513,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $tables['body']['tables']); $this->assertEquals($base['body']['tables'][0]['$id'], $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -528,7 +528,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Search */ - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -538,7 +538,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1, $tables['body']['total']); $this->assertEquals('first', $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -549,7 +549,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Test 1', $tables['body']['tables'][0]['name']); $this->assertEquals('Test 2', $tables['body']['tables'][1]['name']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -561,7 +561,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -573,7 +573,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // This table already exists - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -604,7 +604,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -624,7 +624,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -652,7 +652,7 @@ class DatabasesCustomServerTest extends Scope */ // Create table - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -675,7 +675,7 @@ class DatabasesCustomServerTest extends Scope * Test for creating encrypted columns */ - $columnsPath = '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns'; + $columnsPath = '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns'; $firstName = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -714,7 +714,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Creating row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -732,7 +732,7 @@ class DatabasesCustomServerTest extends Scope ]); // Check row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -745,7 +745,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteColumn(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -762,7 +762,7 @@ class DatabasesCustomServerTest extends Scope */ // Create table - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -781,7 +781,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $actors['headers']['status-code']); $this->assertEquals($actors['body']['name'], 'Actors'); - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -791,7 +791,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -801,7 +801,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $unneeded = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -815,7 +815,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Creating row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -833,7 +833,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -848,7 +848,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish creating index sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -866,7 +866,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($table['body']['indexes'][0]['key'], $index['body']['key']); // Delete column - $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + $column = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -877,7 +877,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Check row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -885,7 +885,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotContains($unneededId, $row['body']); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -910,7 +910,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndex($data): array { $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -921,7 +921,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish deleting index sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -938,7 +938,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndexOnDeleteColumn($data) { $databaseId = $data['databaseId']; - $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -948,7 +948,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -965,7 +965,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -976,7 +976,7 @@ class DatabasesCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -994,7 +994,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting column2 will cause index2 to be dropped, and index1 rebuilt with a single key - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1005,7 +1005,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1020,7 +1020,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($column1['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete column - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1033,7 +1033,7 @@ class DatabasesCustomServerTest extends Scope public function testCleanupDuplicateIndexOnDeleteColumn() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1045,7 +1045,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1066,7 +1066,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; - $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1076,7 +1076,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1093,7 +1093,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1104,7 +1104,7 @@ class DatabasesCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1122,7 +1122,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting column1 would cause index1 to be a duplicate of index2 and automatically removed - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1133,7 +1133,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1148,7 +1148,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($column2['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete column - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1166,7 +1166,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $data['tableId']; // Add Rows to the table - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1182,7 +1182,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1211,7 +1211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Jackson', $row2['body']['lastName']); // Delete the actors table - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1221,7 +1221,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($response['body'], ""); // Try to get the table and check if it has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -1234,7 +1234,7 @@ class DatabasesCustomServerTest extends Scope */ public function testDeleteTableDeletesRelatedColumns(): void { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1244,7 +1244,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1255,7 +1255,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1269,7 +1269,7 @@ class DatabasesCustomServerTest extends Scope $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1282,7 +1282,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $table2, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $table2, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1290,7 +1290,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1 . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1301,7 +1301,7 @@ class DatabasesCustomServerTest extends Scope public function testColumnRowWidthLimit() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1313,7 +1313,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1336,7 +1336,7 @@ class DatabasesCustomServerTest extends Scope // Add wide string columns to approach row width limit for ($i = 0; $i < 15; $i++) { - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1351,7 +1351,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); - $tooWide = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $tooWide = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1367,7 +1367,7 @@ class DatabasesCustomServerTest extends Scope public function testIndexLimitException() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1379,7 +1379,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1403,7 +1403,7 @@ class DatabasesCustomServerTest extends Scope // add unique columns for indexing for ($i = 0; $i < 64; $i++) { // $this->assertEquals(true, static::getDatabase()->createColumn('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1418,7 +1418,7 @@ class DatabasesCustomServerTest extends Scope sleep(10); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1439,7 +1439,7 @@ class DatabasesCustomServerTest extends Scope // MariaDB, MySQL, and MongoDB create 6 indexes per new table // Add up to the limit, then check if the next index throws IndexLimitException for ($i = 0; $i < 58; $i++) { - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1455,7 +1455,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1468,7 +1468,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(64, $table['body']['columns']); $this->assertCount(58, $table['body']['indexes']); - $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ + $tooMany = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1481,7 +1481,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $tooMany['headers']['status-code']); $this->assertEquals('Index limit exceeded', $tooMany['body']['message']); - $table = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1492,7 +1492,7 @@ class DatabasesCustomServerTest extends Scope public function testColumnUpdate(): array { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1503,7 +1503,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $database['headers']['status-code']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1519,7 +1519,7 @@ class DatabasesCustomServerTest extends Scope /** * Create String Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1534,7 +1534,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Email Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1548,7 +1548,7 @@ class DatabasesCustomServerTest extends Scope /** * Create IP Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1562,7 +1562,7 @@ class DatabasesCustomServerTest extends Scope /** * Create URL Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1576,7 +1576,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Integer Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1590,7 +1590,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Float Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1602,7 +1602,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Boolean Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1614,7 +1614,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Datetime Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1626,7 +1626,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Enum Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1655,7 +1655,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1666,7 +1666,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1675,7 +1675,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('lorem', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1686,7 +1686,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('lorem', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1697,7 +1697,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1706,7 +1706,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1717,7 +1717,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1729,7 +1729,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1741,7 +1741,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1753,7 +1753,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1764,7 +1764,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1775,7 +1775,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1797,7 +1797,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1808,7 +1808,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1817,7 +1817,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('torsten@appwrite.io', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1829,7 +1829,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('torsten@appwrite.io', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1840,7 +1840,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1849,7 +1849,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1860,7 +1860,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1872,7 +1872,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1884,7 +1884,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1896,7 +1896,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1907,7 +1907,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1918,7 +1918,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1940,7 +1940,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1951,7 +1951,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1960,7 +1960,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('127.0.0.1', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1971,7 +1971,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('127.0.0.1', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1982,7 +1982,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1991,7 +1991,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2002,7 +2002,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2014,7 +2014,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2026,7 +2026,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2038,7 +2038,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2049,7 +2049,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2060,7 +2060,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2082,7 +2082,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2093,7 +2093,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2102,7 +2102,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('http://appwrite.io', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2113,7 +2113,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('http://appwrite.io', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2124,7 +2124,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2133,7 +2133,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2144,7 +2144,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2156,7 +2156,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2168,7 +2168,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2180,7 +2180,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2191,7 +2191,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2202,7 +2202,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2224,7 +2224,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2237,7 +2237,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2248,7 +2248,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2261,7 +2261,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $column['min']); $this->assertEquals(1000, $column['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2274,7 +2274,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2285,7 +2285,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2298,7 +2298,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2309,7 +2309,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(100, $new['body']['min']); $this->assertEquals(2000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2321,7 +2321,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2336,7 +2336,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2350,7 +2350,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2364,7 +2364,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2378,7 +2378,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2392,7 +2392,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2405,7 +2405,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2418,7 +2418,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2432,7 +2432,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2446,7 +2446,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2461,7 +2461,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2485,7 +2485,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2498,7 +2498,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2509,7 +2509,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2522,7 +2522,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $column['min']); $this->assertEquals(1000, $column['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2535,7 +2535,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2546,7 +2546,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2559,7 +2559,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2570,7 +2570,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(123.456, $new['body']['min']); $this->assertEquals(2000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2582,7 +2582,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2597,7 +2597,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2611,7 +2611,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2625,7 +2625,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2639,7 +2639,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2653,7 +2653,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2666,7 +2666,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2679,7 +2679,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2693,7 +2693,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2707,7 +2707,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2722,7 +2722,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2746,7 +2746,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2757,7 +2757,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2766,7 +2766,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals(true, $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2777,7 +2777,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals(true, $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2788,7 +2788,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2797,7 +2797,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2808,7 +2808,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2820,7 +2820,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2832,7 +2832,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2844,7 +2844,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2855,7 +2855,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2866,7 +2866,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2888,7 +2888,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2899,7 +2899,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2908,7 +2908,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2919,7 +2919,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2930,7 +2930,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2939,7 +2939,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2950,7 +2950,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2962,7 +2962,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2974,7 +2974,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2986,7 +2986,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2997,7 +2997,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3008,7 +3008,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3030,7 +3030,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3042,7 +3042,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3055,7 +3055,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $new['body']['elements']); $this->assertContains('dolor', $new['body']['elements']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3070,7 +3070,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $column['elements']); $this->assertContains('dolor', $column['elements']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3082,7 +3082,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3095,7 +3095,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $new['body']['elements']); $this->assertContains('dolor', $new['body']['elements']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3107,7 +3107,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3122,7 +3122,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3135,7 +3135,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3148,7 +3148,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3161,7 +3161,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3174,7 +3174,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3187,7 +3187,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3199,7 +3199,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3211,7 +3211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3223,7 +3223,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3248,7 +3248,7 @@ class DatabasesCustomServerTest extends Scope $row = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3264,7 +3264,7 @@ class DatabasesCustomServerTest extends Scope ); // Test Resize Up - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3280,7 +3280,7 @@ class DatabasesCustomServerTest extends Scope // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3299,7 +3299,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(2048, strlen($newDoc['body']['string'])); // Test update row with new size - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3313,7 +3313,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(2048, strlen($row['body']['string'])); // Test Exception on resize down with data that is too large - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3327,7 +3327,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $column['body']['type']); // original rows to original size, remove new row - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3340,7 +3340,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('string', $row['body']['string']); - $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ + $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3350,7 +3350,7 @@ class DatabasesCustomServerTest extends Scope // Test Resize Down - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3366,7 +3366,7 @@ class DatabasesCustomServerTest extends Scope // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3385,7 +3385,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, strlen($newDoc['body']['string'])); // Test update row with new size - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3401,7 +3401,7 @@ class DatabasesCustomServerTest extends Scope // Try create row with string that is too large $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3472,7 +3472,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Database exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/i_dont_exist/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/i_dont_exist/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3484,7 +3484,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Table exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3496,7 +3496,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Column exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3519,7 +3519,7 @@ class DatabasesCustomServerTest extends Scope // Create row to test against $row = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3536,7 +3536,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $row['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3550,7 +3550,7 @@ class DatabasesCustomServerTest extends Scope $key = 'new_string'; - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3558,7 +3558,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_string', $new['body']['key']); - $doc1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $doc1 = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3571,7 +3571,7 @@ class DatabasesCustomServerTest extends Scope // Try and create a new row with the new column $doc2 = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3593,7 +3593,7 @@ class DatabasesCustomServerTest extends Scope // Expect fail, try and create a new row with the old column $doc3 = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', + '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3614,7 +3614,7 @@ class DatabasesCustomServerTest extends Scope public function createRelationshipTables(): void { // Prepare the database with tables and relationships - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3625,7 +3625,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3641,7 +3641,7 @@ class DatabasesCustomServerTest extends Scope ] ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3662,7 +3662,7 @@ class DatabasesCustomServerTest extends Scope public function cleanupRelationshipTable(): void { - $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/database1', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3679,7 +3679,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3694,7 +3694,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3707,7 +3707,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3725,7 +3725,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3736,7 +3736,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3751,7 +3751,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3761,7 +3761,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3772,7 +3772,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3793,7 +3793,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3808,7 +3808,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3821,7 +3821,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3839,7 +3839,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3850,7 +3850,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3865,7 +3865,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3875,7 +3875,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3886,7 +3886,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3907,7 +3907,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3922,7 +3922,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3935,7 +3935,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3953,7 +3953,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3964,7 +3964,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3979,7 +3979,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3993,7 +3993,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4004,7 +4004,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4025,7 +4025,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4040,7 +4040,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4053,7 +4053,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4071,7 +4071,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4082,7 +4082,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4097,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4111,7 +4111,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4122,7 +4122,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4138,7 +4138,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkCreate(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4151,7 +4151,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4175,7 +4175,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4188,7 +4188,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4211,7 +4211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertCount(3, $response['body']['rows']); - $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_GET, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4224,7 +4224,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(3, $response['body']['rows']); // TEST SUCCESS - $id is auto-assigned if not included in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4238,7 +4238,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); // TEST FAIL - Can't use data and row together - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4256,7 +4256,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't use $rowId and create bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4272,7 +4272,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't include invalid ID in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4287,7 +4287,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't miss number in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4305,7 +4305,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't push more than APP_LIMIT_DATABASE_BATCH rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4318,7 +4318,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't include invalid permissions in nested rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4332,7 +4332,7 @@ class DatabasesCustomServerTest extends Scope ]); // TEST FAIL - Can't bulk create in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4343,7 +4343,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4360,7 +4360,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/tablesdb/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4376,7 +4376,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkUpdate(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4389,7 +4389,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4413,7 +4413,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4438,7 +4438,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4459,7 +4459,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); // TEST: Update all rows - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4484,7 +4484,7 @@ class DatabasesCustomServerTest extends Scope */ sleep(5); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4511,7 +4511,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Check permissions persist - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4523,7 +4523,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4542,7 +4542,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Update rows with limit - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4557,7 +4557,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4568,7 +4568,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(5, $rows['body']['total']); // TEST: Update rows with offset - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4583,7 +4583,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4594,7 +4594,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, $rows['body']['total']); // TEST: Update rows with equals filter - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4609,7 +4609,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4620,7 +4620,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, $rows['body']['total']); // TEST: Fail - Can't bulk update in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4631,7 +4631,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4648,7 +4648,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4666,7 +4666,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkUpsert(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4679,7 +4679,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4703,7 +4703,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4728,7 +4728,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4749,7 +4749,7 @@ class DatabasesCustomServerTest extends Scope $rows[] = ['number' => 11]; // TEST: Upsert all rows - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4762,7 +4762,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1000, $response['body']['rows'][0]['number']); $this->assertEquals(11, $response['body']['rows'][1]['number']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -4783,7 +4783,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Upsert permissions - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4813,7 +4813,7 @@ class DatabasesCustomServerTest extends Scope ], $response['body']['rows'][1]['$permissions']); // TEST: Fail - Can't bulk upsert in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4824,7 +4824,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4841,7 +4841,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4859,7 +4859,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkDelete(): void { // Create database - $database = $this->client->call(Client::METHOD_POST, '/databases', [ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4872,7 +4872,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4895,7 +4895,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4920,7 +4920,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4932,7 +4932,7 @@ class DatabasesCustomServerTest extends Scope $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4941,7 +4941,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(11, $rows['body']['total']); // TEST: Delete all rows - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4949,7 +4949,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(11, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4960,7 +4960,7 @@ class DatabasesCustomServerTest extends Scope // TEST: Delete rows with query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4968,7 +4968,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4980,7 +4980,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4993,7 +4993,7 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5004,7 +5004,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete rows with query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5012,7 +5012,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5024,7 +5024,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5033,7 +5033,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(6, $rows['body']['total']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5044,7 +5044,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete Rows with limit query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5052,7 +5052,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5064,7 +5064,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5073,7 +5073,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(9, $rows['body']['total']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5084,7 +5084,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete Rows with offset query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5092,7 +5092,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5104,7 +5104,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(6, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5118,7 +5118,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(4, $lastDoc['number']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5129,7 +5129,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete 100 rows $createBulkRows(100); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5137,7 +5137,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(100, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5145,7 +5145,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(100, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5154,7 +5154,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $rows['body']['total']); // TEST: Fail - Can't bulk delete in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5165,7 +5165,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5182,7 +5182,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5192,7 +5192,7 @@ class DatabasesCustomServerTest extends Scope public function testDateTimeRow(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5204,7 +5204,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5219,7 +5219,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5230,7 +5230,7 @@ class DatabasesCustomServerTest extends Scope ]); // Create datetime column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5245,7 +5245,7 @@ class DatabasesCustomServerTest extends Scope $date = '2000-01-01T10:00:00.000+00:00'; // Test - default behaviour of external datetime column not changed - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5266,7 +5266,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($row['body']['$createdAt']); $this->assertNotEmpty($row['body']['$updatedAt']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row1', array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5277,7 +5277,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($row['body']['$updatedAt']); // Test - modifying $createdAt and $updatedAt - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5298,7 +5298,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($row['body']['$updatedAt']); $this->assertNotEquals($row['body']['$updatedAt'], $date); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row2', array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5309,13 +5309,13 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($row['body']['$updatedAt'], $date); // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5324,7 +5324,7 @@ class DatabasesCustomServerTest extends Scope public function testSingleRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5336,7 +5336,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5351,7 +5351,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5370,7 +5370,7 @@ class DatabasesCustomServerTest extends Scope $date3 = '2000-03-01T20:45:00.000+00:00'; // Test 1: Create with custom createdAt, then update with custom updatedAt - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5392,7 +5392,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($createDate, $row['body']['$updatedAt']); // Update with custom updatedAt - $updatedRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row1', array_merge([ + $updatedRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5408,7 +5408,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $updatedRow['body']['$updatedAt']); // Test 2: Create with both custom dates - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5431,7 +5431,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $row2['body']['$updatedAt']); // Test 3: Create without dates, then update with custom dates - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5449,7 +5449,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $row3['headers']['status-code']); - $updatedRow3 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row3', array_merge([ + $updatedRow3 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5466,7 +5466,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $updatedRow3['body']['$updatedAt']); // Test 4: Update only createdAt - $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row4 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5486,7 +5486,7 @@ class DatabasesCustomServerTest extends Scope $originalCreatedAt4 = $row4['body']['$createdAt']; $originalUpdatedAt4 = $row4['body']['$updatedAt']; - $updatedRow4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row4', array_merge([ + $updatedRow4 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row4', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5503,7 +5503,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($originalUpdatedAt4, $updatedRow4['body']['$updatedAt']); // Test 5: Update only updatedAt - $finalRow4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row4', array_merge([ + $finalRow4 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row4', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5520,7 +5520,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $finalRow4['body']['$updatedAt']); // Test 6: Create with updatedAt, update with createdAt - $row5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row5 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5541,7 +5541,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($date2, $row5['body']['$createdAt']); $this->assertEquals($date2, $row5['body']['$updatedAt']); - $updatedRow5 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row5', array_merge([ + $updatedRow5 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row5', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5557,7 +5557,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($date2, $updatedRow5['body']['$updatedAt']); // Test 7: Create with both dates, update with different dates - $row6 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $row6 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5579,7 +5579,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($date1, $row6['body']['$createdAt']); $this->assertEquals($date2, $row6['body']['$updatedAt']); - $updatedRow6 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row6', array_merge([ + $updatedRow6 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/row6', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5596,13 +5596,13 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($date3, $updatedRow6['body']['$updatedAt']); // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5611,7 +5611,7 @@ class DatabasesCustomServerTest extends Scope public function testBulkRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5623,7 +5623,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5638,7 +5638,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5718,7 +5718,7 @@ class DatabasesCustomServerTest extends Scope ]; // Create all rows in one bulk operation - $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5731,7 +5731,7 @@ class DatabasesCustomServerTest extends Scope // Verify initial state foreach (['row1', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5741,7 +5741,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row2', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5751,7 +5751,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row4', 'row5', 'row6'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5776,7 +5776,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5786,7 +5786,7 @@ class DatabasesCustomServerTest extends Scope // Verify updated state foreach (['row1', 'row3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5798,7 +5798,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['row2', 'row4', 'row5', 'row6'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5818,7 +5818,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5829,7 +5829,7 @@ class DatabasesCustomServerTest extends Scope // Verify final state foreach (['row1', 'row2', 'row3', 'row4', 'row5', 'row6'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5841,13 +5841,13 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5856,7 +5856,7 @@ class DatabasesCustomServerTest extends Scope public function testUpsertRowDateOperations(): void { - $databaseId = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $databaseId = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5868,7 +5868,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $databaseId['headers']['status-code']); $databaseId = $databaseId['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5883,7 +5883,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; // Create string column - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5902,7 +5902,7 @@ class DatabasesCustomServerTest extends Scope $date3 = '2000-03-01T20:45:00.000+00:00'; // Test 1: Upsert new row with custom createdAt - $upsertRow1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $upsertRow1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5924,7 +5924,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEquals($createDate, $upsertRow1['body']['$updatedAt']); // Test 2: Upsert existing row with custom updatedAt - $updatedUpsertRow1 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/upsert1', array_merge([ + $updatedUpsertRow1 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/upsert1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5940,7 +5940,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $updatedUpsertRow1['body']['$updatedAt']); // Test 3: Upsert new row with both custom dates - $upsertRow2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $upsertRow2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5963,7 +5963,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($updateDate, $upsertRow2['body']['$updatedAt']); // Test 4: Upsert existing row with different dates - $updatedUpsertRow2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/upsert2', array_merge([ + $updatedUpsertRow2 = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/upsert2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6009,7 +6009,7 @@ class DatabasesCustomServerTest extends Scope ]; // Create rows using bulk upsert - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6021,7 +6021,7 @@ class DatabasesCustomServerTest extends Scope // Test 7: Verify initial bulk upsert state foreach (['bulk_upsert1', 'bulk_upsert3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6031,7 +6031,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['bulk_upsert2', 'bulk_upsert3'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6041,7 +6041,7 @@ class DatabasesCustomServerTest extends Scope } foreach (['bulk_upsert4'] as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6065,7 +6065,7 @@ class DatabasesCustomServerTest extends Scope $upsertIds = ['bulk_upsert1', 'bulk_upsert2', 'bulk_upsert3', 'bulk_upsert4']; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6076,7 +6076,7 @@ class DatabasesCustomServerTest extends Scope // Verify updated state foreach ($upsertIds as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6098,7 +6098,7 @@ class DatabasesCustomServerTest extends Scope ]; // Use bulk update instead of individual updates - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -6109,7 +6109,7 @@ class DatabasesCustomServerTest extends Scope // Verify null handling foreach ($upsertIds as $id) { - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -6120,13 +6120,13 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php similarity index 79% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php index c0c3cdae0b..71d033c89e 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsGuestTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -31,7 +31,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals('InvalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $publicMovies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -41,7 +41,7 @@ class DatabasesPermissionsGuestTest extends Scope Permission::delete(Role::any()), ], ]); - $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $privateMovies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [], @@ -51,12 +51,12 @@ class DatabasesPermissionsGuestTest extends Scope $publicTable = ['id' => $publicMovies['body']['$id']]; $privateTable = ['id' => $privateMovies['body']['$id']]; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -93,14 +93,14 @@ class DatabasesPermissionsGuestTest extends Scope $privateTableId = $data['privateTableId']; $databaseId = $data['databaseId']; - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -114,11 +114,11 @@ class DatabasesPermissionsGuestTest extends Scope $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', [ + $publicRows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ + $privateRows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -148,7 +148,7 @@ class DatabasesPermissionsGuestTest extends Scope $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -161,7 +161,7 @@ class DatabasesPermissionsGuestTest extends Scope $publicRowId = $publicResponse['body']['$id']; $this->assertEquals(201, $publicResponse['headers']['status-code']); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -173,8 +173,8 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(401, $privateResponse['headers']['status-code']); - // Create a row in private collection with API key so we can test that update and delete are also not allowed - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + // Create a row in private table with API key so we can test that update and delete are also not allowed + $privateResponse = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -184,7 +184,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(201, $privateResponse['headers']['status-code']); $privateRowId = $privateResponse['body']['$id']; - $publicRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -196,7 +196,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(200, $publicRow['headers']['status-code']); $this->assertEquals('Thor: Ragnarok', $publicRow['body']['title']); - $privateRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -207,14 +207,14 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(401, $privateRow['headers']['status-code']); - $publicRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); $this->assertEquals(204, $publicRow['headers']['status-code']); - $privateRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -228,7 +228,7 @@ class DatabasesPermissionsGuestTest extends Scope public function testWriteRowWithPermissions() { - $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + $database = $this->client->call(Client::METHOD_POST, '/tablesdb', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -240,7 +240,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals('GuestPermissionsWrite', $database['body']['name']); $databaseId = $database['body']['$id']; - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $movies = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -251,7 +251,7 @@ class DatabasesPermissionsGuestTest extends Scope $moviesId = $movies['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -259,7 +259,7 @@ class DatabasesPermissionsGuestTest extends Scope sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $moviesId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php similarity index 81% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php index 397f82db41..8e5af51493 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsMemberTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $public = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -138,14 +138,14 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $public['headers']['status-code']); $this->tables = ['public' => $public['body']['$id']]; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); $this->assertEquals(202, $response['headers']['status-code']); - $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $private = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Private Movies', 'permissions' => [ @@ -159,14 +159,14 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $private['headers']['status-code']); $this->tables['private'] = $private['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); $this->assertEquals(202, $response['headers']['status-code']); - $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ + $doconly = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Row Only Movies', 'permissions' => [], @@ -175,7 +175,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $private['headers']['status-code']); $this->tables['doconly'] = $doconly['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -202,7 +202,7 @@ class DatabasesPermissionsMemberTest extends Scope $tables = $data['tables']; $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -211,7 +211,7 @@ class DatabasesPermissionsMemberTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -220,7 +220,7 @@ class DatabasesPermissionsMemberTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -232,7 +232,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "any" permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['public'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tables['public'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -245,7 +245,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "users" permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['private'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tables['private'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -258,7 +258,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "user:user1" row only permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['doconly'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php similarity index 98% rename from tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php rename to tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php index 0ab3f83ef1..bffc0606de 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesPermissionsScope.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases', $this->getServerHeader(), [ + $db = $this->client->call(Client::METHOD_POST, '/tablesdb', $this->getServerHeader(), [ 'databaseId' => $this->databaseId, 'name' => 'Test Database', ]); $this->assertEquals(201, $db['headers']['status-code']); - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables', $this->getServerHeader(), [ + $table1 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::custom('table1'), 'name' => 'Table 1', 'permissions' => [ @@ -57,13 +57,13 @@ class DatabasesPermissionsTeamTest extends Scope $this->tables['table1'] = $table1['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables', $this->getServerHeader(), [ + $table2 = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::custom('table2'), 'name' => 'Table 2', 'permissions' => [ @@ -76,7 +76,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->tables['table2'] = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -140,7 +140,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->createTables($this->teams); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -148,7 +148,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', @@ -166,7 +166,7 @@ class DatabasesPermissionsTeamTest extends Scope */ public function testReadRows($user, $table, $success, $users) { - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/grids/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $this->databaseId . '/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -186,7 +186,7 @@ class DatabasesPermissionsTeamTest extends Scope */ public function testWriteRows($user, $table, $success, $users) { - $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $this->databaseId . '/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/GraphQL/AccountTest.php b/tests/e2e/Services/GraphQL/AccountTest.php index c17b8a5c24..9dd224f1a1 100644 --- a/tests/e2e/Services/GraphQL/AccountTest.php +++ b/tests/e2e/Services/GraphQL/AccountTest.php @@ -17,7 +17,7 @@ class AccountTest extends Scope public function testCreateAccount(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email = 'test' . \rand() . '@test.com'; $graphQLPayload = [ 'query' => $query, @@ -45,7 +45,7 @@ class AccountTest extends Scope public function testCreateAccountSession() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -70,7 +70,7 @@ class AccountTest extends Scope public function testCreateMagicURLSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_MAGIC_URL); + $query = $this->getQuery(self::CREATE_MAGIC_URL); $email = 'test' . \rand() . '@test.com'; $graphQLPayload = [ 'query' => $query, @@ -95,7 +95,7 @@ class AccountTest extends Scope public function testCreateEmailVerification(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_VERIFICATION); + $query = $this->getQuery(self::CREATE_EMAIL_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class AccountTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_PHONE_VERIFICATION); + $query = $this->getQuery(self::CREATE_PHONE_VERIFICATION); $graphQLPayload = [ 'query' => $query, ]; @@ -144,7 +144,7 @@ class AccountTest extends Scope public function testCreatePasswordRecovery(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_PASSWORD_RECOVERY); + $query = $this->getQuery(self::CREATE_PASSWORD_RECOVERY); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -168,7 +168,7 @@ class AccountTest extends Scope public function testCreateAnonymousSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ANONYMOUS_SESSION); + $query = $this->getQuery(self::CREATE_ANONYMOUS_SESSION); $graphQLPayload = [ 'query' => $query, ]; @@ -188,7 +188,7 @@ class AccountTest extends Scope public function testCreateAccountJWT(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT_JWT); + $query = $this->getQuery(self::CREATE_ACCOUNT_JWT); $graphQLPayload = [ 'query' => $query, ]; @@ -207,7 +207,7 @@ class AccountTest extends Scope public function testGetAccount(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT); + $query = $this->getQuery(self::GET_ACCOUNT); $graphQLPayload = [ 'query' => $query, ]; @@ -230,7 +230,7 @@ class AccountTest extends Scope public function testGetAccountPreferences(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_PREFS); + $query = $this->getQuery(self::GET_ACCOUNT_PREFS); $graphQLPayload = [ 'query' => $query, ]; @@ -250,7 +250,7 @@ class AccountTest extends Scope public function testGetAccountSessions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_SESSIONS); + $query = $this->getQuery(self::GET_ACCOUNT_SESSIONS); $graphQLPayload = [ 'query' => $query, ]; @@ -270,7 +270,7 @@ class AccountTest extends Scope public function testGetAccountSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_SESSION); + $query = $this->getQuery(self::GET_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -294,7 +294,7 @@ class AccountTest extends Scope public function testGetAccountLogs(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ACCOUNT_LOGS); + $query = $this->getQuery(self::GET_ACCOUNT_LOGS); $graphQLPayload = [ 'query' => $query, ]; @@ -314,7 +314,7 @@ class AccountTest extends Scope public function testUpdateAccountName(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_NAME); + $query = $this->getQuery(self::UPDATE_ACCOUNT_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -338,7 +338,7 @@ class AccountTest extends Scope public function testUpdateAccountEmail(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_EMAIL); + $query = $this->getQuery(self::UPDATE_ACCOUNT_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -363,7 +363,7 @@ class AccountTest extends Scope public function testUpdateAccountPassword(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PASSWORD); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PASSWORD); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -387,7 +387,7 @@ class AccountTest extends Scope public function testUpdateAccountPhone(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PHONE); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PHONE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -412,7 +412,7 @@ class AccountTest extends Scope public function testUpdateAccountStatus(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_STATUS); + $query = $this->getQuery(self::UPDATE_ACCOUNT_STATUS); $graphQLPayload = [ 'query' => $query, ]; @@ -436,7 +436,7 @@ class AccountTest extends Scope public function testUpdateAccountPrefs(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ACCOUNT_PREFS); + $query = $this->getQuery(self::UPDATE_ACCOUNT_PREFS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -462,7 +462,7 @@ class AccountTest extends Scope public function testDeleteAccountSessions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ACCOUNT_SESSIONS); + $query = $this->getQuery(self::DELETE_ACCOUNT_SESSIONS); $graphQLPayload = [ 'query' => $query ]; @@ -484,7 +484,7 @@ class AccountTest extends Scope public function testDeleteAccountSession(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ACCOUNT_SESSION); + $query = $this->getQuery(self::DELETE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/AvatarsTest.php b/tests/e2e/Services/GraphQL/AvatarsTest.php index f805d965e2..4c33aedcd7 100644 --- a/tests/e2e/Services/GraphQL/AvatarsTest.php +++ b/tests/e2e/Services/GraphQL/AvatarsTest.php @@ -16,7 +16,7 @@ class AvatarsTest extends Scope public function testGetCreditCardIcon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CREDIT_CARD_ICON); + $query = $this->getQuery(self::GET_CREDIT_CARD_ICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -39,7 +39,7 @@ class AvatarsTest extends Scope public function testGetBrowserIcon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BROWSER_ICON); + $query = $this->getQuery(self::GET_BROWSER_ICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -62,7 +62,7 @@ class AvatarsTest extends Scope public function testGetCountryFlag() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COUNTRY_FLAG); + $query = $this->getQuery(self::GET_COUNTRY_FLAG); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -85,7 +85,7 @@ class AvatarsTest extends Scope public function testGetImageFromURL() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_IMAGE_FROM_URL); + $query = $this->getQuery(self::GET_IMAGE_FROM_URL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -108,7 +108,7 @@ class AvatarsTest extends Scope public function testGetFavicon() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FAVICON); + $query = $this->getQuery(self::GET_FAVICON); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -131,7 +131,7 @@ class AvatarsTest extends Scope public function testGetQRCode() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_QRCODE); + $query = $this->getQuery(self::GET_QRCODE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -154,7 +154,7 @@ class AvatarsTest extends Scope public function testGetInitials() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_INITIALS); + $query = $this->getQuery(self::GET_USER_INITIALS); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 8b6f85a1b1..820da7982e 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -8,330 +8,330 @@ use Utopia\CLI\Console; trait Base { // Databases - public static string $CREATE_DATABASE = 'create_database'; - public static string $GET_DATABASES = 'get_databases'; - public static string $GET_DATABASE = 'get_database'; - public static string $UPDATE_DATABASE = 'update_database'; - public static string $DELETE_DATABASE = 'delete_database'; + public const string CREATE_DATABASE = 'create_database'; + public const string GET_DATABASES = 'get_databases'; + public const string GET_DATABASE = 'get_database'; + public const string UPDATE_DATABASE = 'update_database'; + public const string DELETE_DATABASE = 'delete_database'; // Collections - public static string $CREATE_COLLECTION = 'create_collection'; - public static string $GET_COLLECTION = 'get_collection'; - public static string $GET_COLLECTIONS = 'list_collections'; - public static string $UPDATE_COLLECTION = 'update_collection'; - public static string $DELETE_COLLECTION = 'delete_collection'; + public const string CREATE_COLLECTION = 'create_collection'; + public const string GET_COLLECTION = 'get_collection'; + public const string GET_COLLECTIONS = 'list_collections'; + public const string UPDATE_COLLECTION = 'update_collection'; + public const string DELETE_COLLECTION = 'delete_collection'; // Grid databases - public static string $GRIDS_CREATE_DATABASE = 'grids_create_database'; - public static string $GRIDS_GET_DATABASES = 'grids_get_databases'; - public static string $GRIDS_GET_DATABASE = 'grids_get_database'; - public static string $GRIDS_UPDATE_DATABASE = 'grids_update_database'; - public static string $GRIDS_DELETE_DATABASE = 'grids_delete_database'; + public const string TABLESDB_CREATE_DATABASE = 'tablesdb_create_database'; + public const string TABLESDB_GET_DATABASES = 'tablesdb_get_databases'; + public const string TABLESDB_GET_DATABASE = 'tablesdb_get_database'; + public const string TABLESDB_UPDATE_DATABASE = 'tablesdb_update_database'; + public const string TABLESDB_DELETE_DATABASE = 'tablesdb_delete_database'; // Grid tables - public static string $CREATE_TABLE = 'create_table'; - public static string $GET_TABLE = 'get_table'; - public static string $GET_TABLES = 'list_tables'; - public static string $UPDATE_TABLE = 'update_table'; - public static string $DELETE_TABLE = 'delete_table'; + public const string CREATE_TABLE = 'create_table'; + public const string GET_TABLE = 'get_table'; + public const string GET_TABLES = 'list_tables'; + public const string UPDATE_TABLE = 'update_table'; + public const string DELETE_TABLE = 'delete_table'; // Attributes - public static string $CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; - public static string $CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; - public static string $CREATE_FLOAT_ATTRIBUTE = 'create_float_attribute'; - public static string $CREATE_BOOLEAN_ATTRIBUTE = 'create_boolean_attribute'; - public static string $CREATE_URL_ATTRIBUTE = 'create_url_attribute'; - public static string $CREATE_EMAIL_ATTRIBUTE = 'create_email_attribute'; - public static string $CREATE_IP_ATTRIBUTE = 'create_ip_attribute'; - public static string $CREATE_ENUM_ATTRIBUTE = 'create_enum_attribute'; - public static string $CREATE_DATETIME_ATTRIBUTE = 'create_datetime_attribute'; + public const string CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; + public const string CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; + public const string CREATE_FLOAT_ATTRIBUTE = 'create_float_attribute'; + public const string CREATE_BOOLEAN_ATTRIBUTE = 'create_boolean_attribute'; + public const string CREATE_URL_ATTRIBUTE = 'create_url_attribute'; + public const string CREATE_EMAIL_ATTRIBUTE = 'create_email_attribute'; + public const string CREATE_IP_ATTRIBUTE = 'create_ip_attribute'; + public const string CREATE_ENUM_ATTRIBUTE = 'create_enum_attribute'; + public const string CREATE_DATETIME_ATTRIBUTE = 'create_datetime_attribute'; - public static string $CREATE_RELATIONSHIP_ATTRIBUTE = 'create_relationship_attribute'; - public static string $UPDATE_STRING_ATTRIBUTE = 'update_string_attribute'; - public static string $UPDATE_INTEGER_ATTRIBUTE = 'update_integer_attribute'; - public static string $UPDATE_FLOAT_ATTRIBUTE = 'update_float_attribute'; - public static string $UPDATE_BOOLEAN_ATTRIBUTE = 'update_boolean_attribute'; - public static string $UPDATE_URL_ATTRIBUTE = 'update_url_attribute'; - public static string $UPDATE_EMAIL_ATTRIBUTE = 'update_email_attribute'; - public static string $UPDATE_IP_ATTRIBUTE = 'update_ip_attribute'; - public static string $UPDATE_ENUM_ATTRIBUTE = 'update_enum_attribute'; - public static string $UPDATE_DATETIME_ATTRIBUTE = 'update_datetime_attribute'; + public const string CREATE_RELATIONSHIP_ATTRIBUTE = 'create_relationship_attribute'; + public const string UPDATE_STRING_ATTRIBUTE = 'update_string_attribute'; + public const string UPDATE_INTEGER_ATTRIBUTE = 'update_integer_attribute'; + public const string UPDATE_FLOAT_ATTRIBUTE = 'update_float_attribute'; + public const string UPDATE_BOOLEAN_ATTRIBUTE = 'update_boolean_attribute'; + public const string UPDATE_URL_ATTRIBUTE = 'update_url_attribute'; + public const string UPDATE_EMAIL_ATTRIBUTE = 'update_email_attribute'; + public const string UPDATE_IP_ATTRIBUTE = 'update_ip_attribute'; + public const string UPDATE_ENUM_ATTRIBUTE = 'update_enum_attribute'; + public const string UPDATE_DATETIME_ATTRIBUTE = 'update_datetime_attribute'; - public static string $UPDATE_RELATIONSHIP_ATTRIBUTE = 'update_relationship_attribute'; - public static string $GET_ATTRIBUTES = 'get_attributes'; - public static string $GET_ATTRIBUTE = 'get_attribute'; - public static string $DELETE_ATTRIBUTE = 'delete_attribute'; + public const string UPDATE_RELATIONSHIP_ATTRIBUTE = 'update_relationship_attribute'; + public const string GET_ATTRIBUTES = 'get_attributes'; + public const string GET_ATTRIBUTE = 'get_attribute'; + public const string DELETE_ATTRIBUTE = 'delete_attribute'; - // Grids columns - public static string $CREATE_STRING_COLUMN = 'create_string_column'; - public static string $CREATE_INTEGER_COLUMN = 'create_integer_column'; - public static string $CREATE_FLOAT_COLUMN = 'create_float_column'; - public static string $CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; - public static string $CREATE_URL_COLUMN = 'create_url_column'; - public static string $CREATE_EMAIL_COLUMN = 'create_email_column'; - public static string $CREATE_IP_COLUMN = 'create_ip_column'; - public static string $CREATE_ENUM_COLUMN = 'create_enum_column'; - public static string $CREATE_DATETIME_COLUMN = 'create_datetime_column'; + // TablesDB columns + public const string CREATE_STRING_COLUMN = 'create_string_column'; + public const string CREATE_INTEGER_COLUMN = 'create_integer_column'; + public const string CREATE_FLOAT_COLUMN = 'create_float_column'; + public const string CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; + public const string CREATE_URL_COLUMN = 'create_url_column'; + public const string CREATE_EMAIL_COLUMN = 'create_email_column'; + public const string CREATE_IP_COLUMN = 'create_ip_column'; + public const string CREATE_ENUM_COLUMN = 'create_enum_column'; + public const string CREATE_DATETIME_COLUMN = 'create_datetime_column'; - public static string $CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; - public static string $UPDATE_STRING_COLUMN = 'update_string_column'; - public static string $UPDATE_INTEGER_COLUMN = 'update_integer_column'; - public static string $UPDATE_FLOAT_COLUMN = 'update_float_column'; - public static string $UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; - public static string $UPDATE_URL_COLUMN = 'update_url_column'; - public static string $UPDATE_EMAIL_COLUMN = 'update_email_column'; - public static string $UPDATE_IP_COLUMN = 'update_ip_column'; - public static string $UPDATE_ENUM_COLUMN = 'update_enum_column'; - public static string $UPDATE_DATETIME_COLUMN = 'update_datetime_column'; + public const string CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; + public const string UPDATE_STRING_COLUMN = 'update_string_column'; + public const string UPDATE_INTEGER_COLUMN = 'update_integer_column'; + public const string UPDATE_FLOAT_COLUMN = 'update_float_column'; + public const string UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; + public const string UPDATE_URL_COLUMN = 'update_url_column'; + public const string UPDATE_EMAIL_COLUMN = 'update_email_column'; + public const string UPDATE_IP_COLUMN = 'update_ip_column'; + public const string UPDATE_ENUM_COLUMN = 'update_enum_column'; + public const string UPDATE_DATETIME_COLUMN = 'update_datetime_column'; - public static string $UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; - public static string $GET_COLUMNS = 'get_columns'; - public static string $GET_COLUMN = 'get_column'; - public static string $DELETE_COLUMN = 'delete_column'; + public const string UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; + public const string GET_COLUMNS = 'get_columns'; + public const string GET_COLUMN = 'get_column'; + public const string DELETE_COLUMN = 'delete_column'; // Attribute Indexes - public static string $CREATE_INDEX = 'create_attribute_index'; - public static string $GET_INDEXES = 'get_attribute_indexes'; - public static string $GET_INDEX = 'get_attribute_index'; - public static string $DELETE_INDEX = 'delete_attribute_index'; + public const string CREATE_INDEX = 'create_attribute_index'; + public const string GET_INDEXES = 'get_attribute_indexes'; + public const string GET_INDEX = 'get_attribute_index'; + public const string DELETE_INDEX = 'delete_attribute_index'; // Grid column indexes - public static string $CREATE_COLUMN_INDEX = 'create_column_index'; - public static string $GET_COLUMN_INDEXES = 'get_column_indexes'; - public static string $GET_COLUMN_INDEX = 'get_column_index'; - public static string $DELETE_COLUMN_INDEX = 'delete_column_index'; + public const string CREATE_COLUMN_INDEX = 'create_column_index'; + public const string GET_COLUMN_INDEXES = 'get_column_indexes'; + public const string GET_COLUMN_INDEX = 'get_column_index'; + public const string DELETE_COLUMN_INDEX = 'delete_column_index'; // Documents - public static string $CREATE_DOCUMENT = 'create_document_rest'; - public static string $GET_DOCUMENTS = 'list_documents'; - public static string $GET_DOCUMENT = 'get_document'; - public static string $UPDATE_DOCUMENT = 'update_document'; - public static string $UPSERT_DOCUMENT = 'upsert_document'; - public static string $DELETE_DOCUMENT = 'delete_document'; + public const string CREATE_DOCUMENT = 'create_document_rest'; + public const string GET_DOCUMENTS = 'list_documents'; + public const string GET_DOCUMENT = 'get_document'; + public const string UPDATE_DOCUMENT = 'update_document'; + public const string UPSERT_DOCUMENT = 'upsert_document'; + public const string DELETE_DOCUMENT = 'delete_document'; // Documents - Bulk APIs - public static string $CREATE_DOCUMENTS = 'create_documents_rest'; - public static string $UPDATE_DOCUMENTS = 'update_documents'; - public static string $UPSERT_DOCUMENTS = 'upsert_documents'; - public static string $DELETE_DOCUMENTS = 'delete_documents'; + public const string CREATE_DOCUMENTS = 'create_documents_rest'; + public const string UPDATE_DOCUMENTS = 'update_documents'; + public const string UPSERT_DOCUMENTS = 'upsert_documents'; + public const string DELETE_DOCUMENTS = 'delete_documents'; // Grid rows - public static string $CREATE_ROW = 'create_row_rest'; - public static string $GET_ROWS = 'list_rows'; - public static string $GET_ROW = 'get_row'; - public static string $UPDATE_ROW = 'update_row'; - public static string $UPSERT_ROW = 'upsert_row'; - public static string $DELETE_ROW = 'delete_row'; + public const string CREATE_ROW = 'create_row_rest'; + public const string GET_ROWS = 'list_rows'; + public const string GET_ROW = 'get_row'; + public const string UPDATE_ROW = 'update_row'; + public const string UPSERT_ROW = 'upsert_row'; + public const string DELETE_ROW = 'delete_row'; // Grid rows - Bulk APIs - public static string $CREATE_ROWS = 'create_rows_rest'; - public static string $UPDATE_ROWS = 'update_rows'; - public static string $UPSERT_ROWS = 'upsert_rows'; - public static string $DELETE_ROWS = 'delete_rows'; + public const string CREATE_ROWS = 'create_rows_rest'; + public const string UPDATE_ROWS = 'update_rows'; + public const string UPSERT_ROWS = 'upsert_rows'; + public const string DELETE_ROWS = 'delete_rows'; // Custom Entities - public static string $CREATE_CUSTOM_ENTITY = 'create_custom_entity'; - public static string $GET_CUSTOM_ENTITIES = 'get_custom_entities'; - public static string $GET_CUSTOM_ENTITY = 'get_custom_entity'; - public static string $UPDATE_CUSTOM_ENTITY = 'update_custom_entity'; - public static string $DELETE_CUSTOM_ENTITY = 'delete_custom_entity'; + public const string CREATE_CUSTOM_ENTITY = 'create_custom_entity'; + public const string GET_CUSTOM_ENTITIES = 'get_custom_entities'; + public const string GET_CUSTOM_ENTITY = 'get_custom_entity'; + public const string UPDATE_CUSTOM_ENTITY = 'update_custom_entity'; + public const string DELETE_CUSTOM_ENTITY = 'delete_custom_entity'; // Account - public static string $CREATE_ACCOUNT = 'create_account'; - public static string $CREATE_ACCOUNT_SESSION = 'create_account_session'; - public static string $CREATE_ANONYMOUS_SESSION = 'create_anonymous_session'; - public static string $CREATE_ACCOUNT_JWT = 'create_account_jwt'; - public static string $CREATE_MAGIC_URL = 'create_magic_url'; - public static string $CREATE_PASSWORD_RECOVERY = 'create_password_recovery'; - public static string $CREATE_EMAIL_VERIFICATION = 'create_email_verification'; - public static string $CREATE_PHONE_VERIFICATION = 'create_phone_verification'; - public static string $GET_ACCOUNT = 'get_account'; - public static string $GET_ACCOUNT_SESSION = 'get_account_session'; - public static string $GET_ACCOUNT_SESSIONS = 'get_account_sessions'; - public static string $GET_ACCOUNT_PREFS = 'get_account_preferences'; - public static string $GET_ACCOUNT_LOGS = 'get_account_logs'; - public static string $UPDATE_ACCOUNT_NAME = 'update_account_name'; - public static string $UPDATE_ACCOUNT_EMAIL = 'update_account_email'; - public static string $UPDATE_ACCOUNT_PASSWORD = 'update_account_password'; - public static string $UPDATE_ACCOUNT_PREFS = 'update_account_prefs'; - public static string $UPDATE_ACCOUNT_PHONE = 'update_account_phone'; - public static string $UPDATE_ACCOUNT_STATUS = 'update_account_status'; - public static string $UPDATE_MAGIC_URL = 'confirm_magic_url'; - public static string $UPDATE_PASSWORD_RECOVERY = 'confirm_password_recovery'; - public static string $UPDATE_EMAIL_VERIFICATION = 'confirm_email_verification'; - public static string $UPDATE_PHONE_VERIFICATION = 'confirm_phone_verification'; - public static string $DELETE_ACCOUNT_SESSION = 'delete_account_session'; - public static string $DELETE_ACCOUNT_SESSIONS = 'delete_account_sessions'; + public const string CREATE_ACCOUNT = 'create_account'; + public const string CREATE_ACCOUNT_SESSION = 'create_account_session'; + public const string CREATE_ANONYMOUS_SESSION = 'create_anonymous_session'; + public const string CREATE_ACCOUNT_JWT = 'create_account_jwt'; + public const string CREATE_MAGIC_URL = 'create_magic_url'; + public const string CREATE_PASSWORD_RECOVERY = 'create_password_recovery'; + public const string CREATE_EMAIL_VERIFICATION = 'create_email_verification'; + public const string CREATE_PHONE_VERIFICATION = 'create_phone_verification'; + public const string GET_ACCOUNT = 'get_account'; + public const string GET_ACCOUNT_SESSION = 'get_account_session'; + public const string GET_ACCOUNT_SESSIONS = 'get_account_sessions'; + public const string GET_ACCOUNT_PREFS = 'get_account_preferences'; + public const string GET_ACCOUNT_LOGS = 'get_account_logs'; + public const string UPDATE_ACCOUNT_NAME = 'update_account_name'; + public const string UPDATE_ACCOUNT_EMAIL = 'update_account_email'; + public const string UPDATE_ACCOUNT_PASSWORD = 'update_account_password'; + public const string UPDATE_ACCOUNT_PREFS = 'update_account_prefs'; + public const string UPDATE_ACCOUNT_PHONE = 'update_account_phone'; + public const string UPDATE_ACCOUNT_STATUS = 'update_account_status'; + public const string UPDATE_MAGIC_URL = 'confirm_magic_url'; + public const string UPDATE_PASSWORD_RECOVERY = 'confirm_password_recovery'; + public const string UPDATE_EMAIL_VERIFICATION = 'confirm_email_verification'; + public const string UPDATE_PHONE_VERIFICATION = 'confirm_phone_verification'; + public const string DELETE_ACCOUNT_SESSION = 'delete_account_session'; + public const string DELETE_ACCOUNT_SESSIONS = 'delete_account_sessions'; // Users - public static string $CREATE_USER = 'create_user'; - public static string $GET_USER = 'get_user'; - public static string $GET_USERS = 'list_user'; - public static string $GET_USER_PREFERENCES = 'get_user_preferences'; - public static string $GET_USER_SESSIONS = 'get_user_sessions'; - public static string $GET_USER_MEMBERSHIPS = 'get_user_memberships'; - public static string $GET_USER_LOGS = 'get_user_logs'; - public static string $UPDATE_USER_STATUS = 'update_user_status'; - public static string $UPDATE_USER_NAME = 'update_user_name'; - public static string $UPDATE_USER_EMAIL = 'update_user_email'; - public static string $UPDATE_USER_EMAIL_VERIFICATION = 'update_email_verification'; - public static string $UPDATE_USER_PHONE_VERIFICATION = 'update_phone_verification'; - public static string $UPDATE_USER_PASSWORD = 'update_user_password'; - public static string $UPDATE_USER_PHONE = 'update_user_phone'; - public static string $UPDATE_USER_PREFS = 'update_user_prefs'; - public static string $DELETE_USER_SESSIONS = 'delete_user_sessions'; - public static string $DELETE_USER_SESSION = 'delete_user_session'; - public static string $DELETE_USER = 'delete_user'; - public static string $CREATE_USER_TARGET = 'create_user_target'; - public static string $LIST_USER_TARGETS = 'list_user_targets'; - public static string $GET_USER_TARGET = 'get_user_target'; - public static string $UPDATE_USER_TARGET = 'update_user_target'; - public static string $DELETE_USER_TARGET = 'delete_user_target'; + public const string CREATE_USER = 'create_user'; + public const string GET_USER = 'get_user'; + public const string GET_USERS = 'list_user'; + public const string GET_USER_PREFERENCES = 'get_user_preferences'; + public const string GET_USER_SESSIONS = 'get_user_sessions'; + public const string GET_USER_MEMBERSHIPS = 'get_user_memberships'; + public const string GET_USER_LOGS = 'get_user_logs'; + public const string UPDATE_USER_STATUS = 'update_user_status'; + public const string UPDATE_USER_NAME = 'update_user_name'; + public const string UPDATE_USER_EMAIL = 'update_user_email'; + public const string UPDATE_USER_EMAIL_VERIFICATION = 'update_email_verification'; + public const string UPDATE_USER_PHONE_VERIFICATION = 'update_phone_verification'; + public const string UPDATE_USER_PASSWORD = 'update_user_password'; + public const string UPDATE_USER_PHONE = 'update_user_phone'; + public const string UPDATE_USER_PREFS = 'update_user_prefs'; + public const string DELETE_USER_SESSIONS = 'delete_user_sessions'; + public const string DELETE_USER_SESSION = 'delete_user_session'; + public const string DELETE_USER = 'delete_user'; + public const string CREATE_USER_TARGET = 'create_user_target'; + public const string LIST_USER_TARGETS = 'list_user_targets'; + public const string GET_USER_TARGET = 'get_user_target'; + public const string UPDATE_USER_TARGET = 'update_user_target'; + public const string DELETE_USER_TARGET = 'delete_user_target'; // Teams - public static string $GET_TEAM = 'get_team'; - public static string $GET_TEAM_PREFERENCES = 'get_team_preferences'; - public static string $GET_TEAMS = 'list_teams'; - public static string $CREATE_TEAM = 'create_team'; - public static string $UPDATE_TEAM_NAME = 'update_team_name'; - public static string $UPDATE_TEAM_PREFERENCES = 'update_team_preferences'; + public const string GET_TEAM = 'get_team'; + public const string GET_TEAM_PREFERENCES = 'get_team_preferences'; + public const string GET_TEAMS = 'list_teams'; + public const string CREATE_TEAM = 'create_team'; + public const string UPDATE_TEAM_NAME = 'update_team_name'; + public const string UPDATE_TEAM_PREFERENCES = 'update_team_preferences'; - public static string $DELETE_TEAM = 'delete_team'; - public static string $GET_TEAM_MEMBERSHIP = 'get_team_membership'; - public static string $GET_TEAM_MEMBERSHIPS = 'list_team_memberships'; - public static string $CREATE_TEAM_MEMBERSHIP = 'create_team_membership'; - public static string $UPDATE_TEAM_MEMBERSHIP = 'update_team_membership'; - public static string $UPDATE_TEAM_MEMBERSHIP_STATUS = 'update_membership_status'; - public static string $DELETE_TEAM_MEMBERSHIP = 'delete_team_membership'; + public const string DELETE_TEAM = 'delete_team'; + public const string GET_TEAM_MEMBERSHIP = 'get_team_membership'; + public const string GET_TEAM_MEMBERSHIPS = 'list_team_memberships'; + public const string CREATE_TEAM_MEMBERSHIP = 'create_team_membership'; + public const string UPDATE_TEAM_MEMBERSHIP = 'update_team_membership'; + public const string UPDATE_TEAM_MEMBERSHIP_STATUS = 'update_membership_status'; + public const string DELETE_TEAM_MEMBERSHIP = 'delete_team_membership'; // Functions - public static string $CREATE_FUNCTION = 'create_function'; - public static string $GET_FUNCTIONS = 'list_functions'; - public static string $GET_FUNCTION = 'get_function'; - public static string $GET_RUNTIMES = 'list_runtimes'; - public static string $UPDATE_FUNCTION = 'update_function'; - public static string $DELETE_FUNCTION = 'delete_function'; + public const string CREATE_FUNCTION = 'create_function'; + public const string GET_FUNCTIONS = 'list_functions'; + public const string GET_FUNCTION = 'get_function'; + public const string GET_RUNTIMES = 'list_runtimes'; + public const string UPDATE_FUNCTION = 'update_function'; + public const string DELETE_FUNCTION = 'delete_function'; // Variables - public static string $CREATE_VARIABLE = 'create_variable'; - public static string $GET_VARIABLES = 'list_variables'; - public static string $GET_VARIABLE = 'get_variable'; - public static string $UPDATE_VARIABLE = 'update_variable'; - public static string $DELETE_VARIABLE = 'delete_variable'; + public const string CREATE_VARIABLE = 'create_variable'; + public const string GET_VARIABLES = 'list_variables'; + public const string GET_VARIABLE = 'get_variable'; + public const string UPDATE_VARIABLE = 'update_variable'; + public const string DELETE_VARIABLE = 'delete_variable'; //Deployments - public static string $CREATE_DEPLOYMENT = 'create_deployment'; - public static string $GET_DEPLOYMENTS = 'list_deployments'; - public static string $GET_DEPLOYMENT = 'get_deployment'; - public static string $UPDATE_DEPLOYMENT = 'update_deployment'; - public static string $DELETE_DEPLOYMENT = 'delete_deployment'; + public const string CREATE_DEPLOYMENT = 'create_deployment'; + public const string GET_DEPLOYMENTS = 'list_deployments'; + public const string GET_DEPLOYMENT = 'get_deployment'; + public const string UPDATE_DEPLOYMENT = 'update_deployment'; + public const string DELETE_DEPLOYMENT = 'delete_deployment'; // Executions - public static string $GET_EXECUTIONS = 'list_executions'; - public static string $GET_EXECUTION = 'get_execution'; - public static string $CREATE_EXECUTION = 'create_execution'; - public static string $DELETE_EXECUTION = 'delete_execution'; - public static string $RETRY_BUILD = 'retry_build'; + public const string GET_EXECUTIONS = 'list_executions'; + public const string GET_EXECUTION = 'get_execution'; + public const string CREATE_EXECUTION = 'create_execution'; + public const string DELETE_EXECUTION = 'delete_execution'; + public const string RETRY_BUILD = 'retry_build'; // Buckets - public static string $CREATE_BUCKET = 'create_bucket'; - public static string $GET_BUCKETS = 'list_buckets'; - public static string $GET_BUCKET = 'get_bucket'; - public static string $UPDATE_BUCKET = 'update_bucket'; - public static string $DELETE_BUCKET = 'delete_bucket'; + public const string CREATE_BUCKET = 'create_bucket'; + public const string GET_BUCKETS = 'list_buckets'; + public const string GET_BUCKET = 'get_bucket'; + public const string UPDATE_BUCKET = 'update_bucket'; + public const string DELETE_BUCKET = 'delete_bucket'; // Files - public static string $CREATE_FILE = 'create_file'; - public static string $GET_FILES = 'list_files'; - public static string $GET_FILE = 'get_file'; - public static string $GET_FILE_PREVIEW = 'get_file_preview'; - public static string $GET_FILE_DOWNLOAD = 'get_file_download'; - public static string $GET_FILE_VIEW = 'get_file_view'; - public static string $UPDATE_FILE = 'update_file'; - public static string $DELETE_FILE = 'delete_file'; + public const string CREATE_FILE = 'create_file'; + public const string GET_FILES = 'list_files'; + public const string GET_FILE = 'get_file'; + public const string GET_FILE_PREVIEW = 'get_file_preview'; + public const string GET_FILE_DOWNLOAD = 'get_file_download'; + public const string GET_FILE_VIEW = 'get_file_view'; + public const string UPDATE_FILE = 'update_file'; + public const string DELETE_FILE = 'delete_file'; // Health - public static string $GET_HTTP_HEALTH = 'get_http_health'; - public static string $GET_DB_HEALTH = 'get_db_health'; - public static string $GET_CACHE_HEALTH = 'get_cache_health'; - public static string $GET_TIME_HEALTH = 'get_time_health'; - public static string $GET_WEBHOOKS_QUEUE_HEALTH = 'get_webhooks_queue_health'; - public static string $GET_LOGS_QUEUE_HEALTH = 'get_logs_queue_health'; - public static string $GET_CERTIFICATES_QUEUE_HEALTH = 'get_certificates_queue_health'; - public static string $GET_FUNCTION_QUEUE_HEALTH = 'get_functions_queue_health'; - public static string $GET_LOCAL_STORAGE_HEALTH = 'get_local_storage_health'; - public static string $GET_ANITVIRUS_HEALTH = 'get_antivirus_health'; + public const string GET_HTTP_HEALTH = 'get_http_health'; + public const string GET_DB_HEALTH = 'get_db_health'; + public const string GET_CACHE_HEALTH = 'get_cache_health'; + public const string GET_TIME_HEALTH = 'get_time_health'; + public const string GET_WEBHOOKS_QUEUE_HEALTH = 'get_webhooks_queue_health'; + public const string GET_LOGS_QUEUE_HEALTH = 'get_logs_queue_health'; + public const string GET_CERTIFICATES_QUEUE_HEALTH = 'get_certificates_queue_health'; + public const string GET_FUNCTION_QUEUE_HEALTH = 'get_functions_queue_health'; + public const string GET_LOCAL_STORAGE_HEALTH = 'get_local_storage_health'; + public const string GET_ANITVIRUS_HEALTH = 'get_antivirus_health'; // Localization - public static string $GET_LOCALE = 'get_locale'; - public static string $LIST_COUNTRIES = 'list_countries'; - public static string $LIST_EU_COUNTRIES = 'list_eu_countries'; - public static string $LIST_COUNTRY_PHONE_CODES = 'list_country_phone_codes'; - public static string $LIST_CONTINENTS = 'list_continents'; - public static string $LIST_CURRENCIES = 'list_currencies'; - public static string $LIST_LANGUAGES = 'list_languages'; + public const string GET_LOCALE = 'get_locale'; + public const string LIST_COUNTRIES = 'list_countries'; + public const string LIST_EU_COUNTRIES = 'list_eu_countries'; + public const string LIST_COUNTRY_PHONE_CODES = 'list_country_phone_codes'; + public const string LIST_CONTINENTS = 'list_continents'; + public const string LIST_CURRENCIES = 'list_currencies'; + public const string LIST_LANGUAGES = 'list_languages'; // Avatars - public static string $GET_CREDIT_CARD_ICON = 'get_credit_card_icon'; - public static string $GET_BROWSER_ICON = 'get_browser_icon'; - public static string $GET_COUNTRY_FLAG = 'get_country_flag'; - public static string $GET_IMAGE_FROM_URL = 'get_image_from_url'; - public static string $GET_FAVICON = 'get_favicon'; - public static string $GET_QRCODE = 'get_qrcode'; - public static string $GET_USER_INITIALS = 'get_user_initials'; + public const string GET_CREDIT_CARD_ICON = 'get_credit_card_icon'; + public const string GET_BROWSER_ICON = 'get_browser_icon'; + public const string GET_COUNTRY_FLAG = 'get_country_flag'; + public const string GET_IMAGE_FROM_URL = 'get_image_from_url'; + public const string GET_FAVICON = 'get_favicon'; + public const string GET_QRCODE = 'get_qrcode'; + public const string GET_USER_INITIALS = 'get_user_initials'; // Providers - public static string $CREATE_MAILGUN_PROVIDER = 'create_mailgun_provider'; - public static string $CREATE_SENDGRID_PROVIDER = 'create_sendgrid_provider'; - public static string $CREATE_SMTP_PROVIDER = 'create_smtp_provider'; - public static string $CREATE_TWILIO_PROVIDER = 'create_twilio_provider'; - public static string $CREATE_TELESIGN_PROVIDER = 'create_telesign_provider'; - public static string $CREATE_TEXTMAGIC_PROVIDER = 'create_textmagic_provider'; - public static string $CREATE_MSG91_PROVIDER = 'create_msg91_provider'; - public static string $CREATE_VONAGE_PROVIDER = 'create_vonage_provider'; - public static string $CREATE_FCM_PROVIDER = 'create_fcm_provider'; - public static string $CREATE_APNS_PROVIDER = 'create_apns_provider'; - public static string $LIST_PROVIDERS = 'list_providers'; - public static string $GET_PROVIDER = 'get_provider'; - public static string $UPDATE_MAILGUN_PROVIDER = 'update_mailgun_provider'; - public static string $UPDATE_SENDGRID_PROVIDER = 'update_sendgrid_provider'; - public static string $UPDATE_SMTP_PROVIDER = 'update_smtp_provider'; - public static string $UPDATE_TWILIO_PROVIDER = 'update_twilio_provider'; - public static string $UPDATE_TELESIGN_PROVIDER = 'update_telesign_provider'; - public static string $UPDATE_TEXTMAGIC_PROVIDER = 'update_textmagic_provider'; - public static string $UPDATE_MSG91_PROVIDER = 'update_msg91_provider'; - public static string $UPDATE_VONAGE_PROVIDER = 'update_vonage_provider'; - public static string $UPDATE_FCM_PROVIDER = 'update_fcm_provider'; - public static string $UPDATE_APNS_PROVIDER = 'update_apns_provider'; - public static string $DELETE_PROVIDER = 'delete_provider'; + public const string CREATE_MAILGUN_PROVIDER = 'create_mailgun_provider'; + public const string CREATE_SENDGRID_PROVIDER = 'create_sendgrid_provider'; + public const string CREATE_SMTP_PROVIDER = 'create_smtp_provider'; + public const string CREATE_TWILIO_PROVIDER = 'create_twilio_provider'; + public const string CREATE_TELESIGN_PROVIDER = 'create_telesign_provider'; + public const string CREATE_TEXTMAGIC_PROVIDER = 'create_textmagic_provider'; + public const string CREATE_MSG91_PROVIDER = 'create_msg91_provider'; + public const string CREATE_VONAGE_PROVIDER = 'create_vonage_provider'; + public const string CREATE_FCM_PROVIDER = 'create_fcm_provider'; + public const string CREATE_APNS_PROVIDER = 'create_apns_provider'; + public const string LIST_PROVIDERS = 'list_providers'; + public const string GET_PROVIDER = 'get_provider'; + public const string UPDATE_MAILGUN_PROVIDER = 'update_mailgun_provider'; + public const string UPDATE_SENDGRID_PROVIDER = 'update_sendgrid_provider'; + public const string UPDATE_SMTP_PROVIDER = 'update_smtp_provider'; + public const string UPDATE_TWILIO_PROVIDER = 'update_twilio_provider'; + public const string UPDATE_TELESIGN_PROVIDER = 'update_telesign_provider'; + public const string UPDATE_TEXTMAGIC_PROVIDER = 'update_textmagic_provider'; + public const string UPDATE_MSG91_PROVIDER = 'update_msg91_provider'; + public const string UPDATE_VONAGE_PROVIDER = 'update_vonage_provider'; + public const string UPDATE_FCM_PROVIDER = 'update_fcm_provider'; + public const string UPDATE_APNS_PROVIDER = 'update_apns_provider'; + public const string DELETE_PROVIDER = 'delete_provider'; // Topics - public static string $CREATE_TOPIC = 'create_topic'; - public static string $LIST_TOPICS = 'list_topics'; - public static string $GET_TOPIC = 'get_topic'; - public static string $UPDATE_TOPIC = 'update_topic'; - public static string $DELETE_TOPIC = 'delete_topic'; + public const string CREATE_TOPIC = 'create_topic'; + public const string LIST_TOPICS = 'list_topics'; + public const string GET_TOPIC = 'get_topic'; + public const string UPDATE_TOPIC = 'update_topic'; + public const string DELETE_TOPIC = 'delete_topic'; // Subscriptions - public static string $CREATE_SUBSCRIBER = 'create_subscriber'; - public static string $LIST_SUBSCRIBERS = 'list_subscribers'; - public static string $GET_SUBSCRIBER = 'get_subscriber'; - public static string $DELETE_SUBSCRIBER = 'delete_subscriber'; + public const string CREATE_SUBSCRIBER = 'create_subscriber'; + public const string LIST_SUBSCRIBERS = 'list_subscribers'; + public const string GET_SUBSCRIBER = 'get_subscriber'; + public const string DELETE_SUBSCRIBER = 'delete_subscriber'; // Messages - public static string $CREATE_EMAIL = 'create_email'; - public static string $CREATE_SMS = 'create_sms'; - public static string $CREATE_PUSH_NOTIFICATION = 'create_push_notification'; - public static string $LIST_MESSAGES = 'list_messages'; - public static string $GET_MESSAGE = 'get_message'; + public const string CREATE_EMAIL = 'create_email'; + public const string CREATE_SMS = 'create_sms'; + public const string CREATE_PUSH_NOTIFICATION = 'create_push_notification'; + public const string LIST_MESSAGES = 'list_messages'; + public const string GET_MESSAGE = 'get_message'; - public static string $UPDATE_EMAIL = 'update_email'; - public static string $UPDATE_SMS = 'update_sms'; - public static string $UPDATE_PUSH_NOTIFICATION = 'update_push_notification'; + public const string UPDATE_EMAIL = 'update_email'; + public const string UPDATE_SMS = 'update_sms'; + public const string UPDATE_PUSH_NOTIFICATION = 'update_push_notification'; // Complex queries - public static string $COMPLEX_QUERY_TABLE = 'complex_query_table'; - public static string $COMPLEX_QUERY_COLLECTION = 'complex_query_collection'; + public const string COMPLEX_QUERY_TABLE = 'complex_query_table'; + public const string COMPLEX_QUERY_COLLECTION = 'complex_query_collection'; // Attribute Fragments - public static string $FRAGMENT_ATTRIBUTES = ' + public const string FRAGMENT_ATTRIBUTES = ' fragment attributeProperties on Attributes { ... on AttributeString { key @@ -406,7 +406,7 @@ trait Base '; // Column Fragments - public static string $FRAGMENT_COLUMNS = ' + public const string FRAGMENT_COLUMNS = ' fragment columnProperties on Columns { ... on ColumnString { key @@ -480,7 +480,7 @@ trait Base } '; - public static string $FRAGMENT_HASH_OPTIONS = ' + public const string FRAGMENT_HASH_OPTIONS = ' fragment options on HashOptions { ... on AlgoArgon2 { memoryCost @@ -504,14 +504,14 @@ trait Base public function getQuery(string $name): string { switch ($name) { - case self::$CREATE_DATABASE: + case self::CREATE_DATABASE: return 'mutation createDatabase($databaseId: String!, $name: String!) { databasesCreate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GET_DATABASES: + case self::GET_DATABASES: return 'query listDatabases { databasesList { total @@ -521,36 +521,36 @@ trait Base } } }'; - case self::$GET_DATABASE: + case self::GET_DATABASE: return 'query getDatabase($databaseId: String!) { databasesGet(databaseId: $databaseId) { _id name } }'; - case self::$UPDATE_DATABASE: + case self::UPDATE_DATABASE: return 'mutation updateDatabase($databaseId: String!, $name: String!) { databasesUpdate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$DELETE_DATABASE: + case self::DELETE_DATABASE: return 'mutation deleteDatabase($databaseId: String!) { databasesDelete(databaseId: $databaseId) { status } }'; - case self::$GRIDS_CREATE_DATABASE: - return 'mutation gridsCreateDatabase($databaseId: String!, $name: String!) { - gridsCreateDatabase(databaseId: $databaseId, name: $name) { + case self::TABLESDB_CREATE_DATABASE: + return 'mutation tablesDbCreate($databaseId: String!, $name: String!) { + tablesDbCreate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GRIDS_GET_DATABASES: - return 'query gridsListDatabases { - gridsListDatabases { + case self::TABLESDB_GET_DATABASES: + return 'query tablesDbList { + tablesDbList { total databases { _id @@ -558,27 +558,27 @@ trait Base } } }'; - case self::$GRIDS_GET_DATABASE: - return 'query gridsGetDatabase($databaseId: String!) { - gridsGetDatabase(databaseId: $databaseId) { + case self::TABLESDB_GET_DATABASE: + return 'query tablesDbGet($databaseId: String!) { + tablesDbGet(databaseId: $databaseId) { _id name } }'; - case self::$GRIDS_UPDATE_DATABASE: - return 'mutation gridsUpdateDatabase($databaseId: String!, $name: String!) { - gridsUpdateDatabase(databaseId: $databaseId, name: $name) { + case self::TABLESDB_UPDATE_DATABASE: + return 'mutation tablesDbUpdate($databaseId: String!, $name: String!) { + tablesDbUpdate(databaseId: $databaseId, name: $name) { _id name } }'; - case self::$GRIDS_DELETE_DATABASE: - return 'mutation gridsDeleteDatabase($databaseId: String!) { - gridsDeleteDatabase(databaseId: $databaseId) { + case self::TABLESDB_DELETE_DATABASE: + return 'mutation tablesDbDelete($databaseId: String!) { + tablesDbDelete(databaseId: $databaseId) { status } }'; - case self::$GET_COLLECTION: + case self::GET_COLLECTION: return 'query getCollection($databaseId: String!, $collectionId: String!) { databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { _id @@ -587,7 +587,7 @@ trait Base name } }'; - case self::$GET_COLLECTIONS: + case self::GET_COLLECTIONS: return 'query listCollections($databaseId: String!) { databasesListCollections(databaseId: $databaseId) { total @@ -599,7 +599,7 @@ trait Base } } }'; - case self::$CREATE_COLLECTION: + case self::CREATE_COLLECTION: return 'mutation createCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!]!) { databasesCreateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions) { _id @@ -608,7 +608,7 @@ trait Base name } }'; - case self::$UPDATE_COLLECTION: + case self::UPDATE_COLLECTION: return 'mutation updateCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!], $enabled: Boolean){ databasesUpdateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions, enabled: $enabled) { _id @@ -617,24 +617,24 @@ trait Base name } }'; - case self::$DELETE_COLLECTION: + case self::DELETE_COLLECTION: return 'mutation deleteCollection($databaseId: String!, $collectionId: String!){ databasesDeleteCollection(databaseId: $databaseId, collectionId: $collectionId) { status } }'; - case self::$GET_TABLE: - return 'query gridsGetTable($databaseId: String!, $tableId: String!) { - gridsGetTable(databaseId: $databaseId, tableId: $tableId) { + case self::GET_TABLE: + return 'query tablesDbGetTable($databaseId: String!, $tableId: String!) { + tablesDbGetTable(databaseId: $databaseId, tableId: $tableId) { _id _permissions rowSecurity name } }'; - case self::$GET_TABLES: - return 'query gridsListTables($databaseId: String!) { - gridsListTables(databaseId: $databaseId) { + case self::GET_TABLES: + return 'query tablesDbListTables($databaseId: String!) { + tablesDbListTables(databaseId: $databaseId) { total tables { _id @@ -644,31 +644,31 @@ trait Base } } }'; - case self::$CREATE_TABLE: - return 'mutation gridsCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { - gridsCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + case self::CREATE_TABLE: + return 'mutation tablesDbCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + tablesDbCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { _id _permissions rowSecurity name } }'; - case self::$UPDATE_TABLE: - return 'mutation gridsUpdateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { - gridsUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { + case self::UPDATE_TABLE: + return 'mutation tablesDbUpdateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { + tablesDbUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions rowSecurity name } }'; - case self::$DELETE_TABLE: - return 'mutation gridsDeleteTable($databaseId: String!, $tableId: String!) { - gridsDeleteTable(databaseId: $databaseId, tableId: $tableId) { + case self::DELETE_TABLE: + return 'mutation tablesDbDeleteTable($databaseId: String!, $tableId: String!) { + tablesDbDeleteTable(databaseId: $databaseId, tableId: $tableId) { status } }'; - case self::$CREATE_STRING_ATTRIBUTE: + case self::CREATE_STRING_ATTRIBUTE: return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { key @@ -677,7 +677,7 @@ trait Base array } }'; - case self::$CREATE_INTEGER_ATTRIBUTE: + case self::CREATE_INTEGER_ATTRIBUTE: return 'mutation createIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key @@ -688,7 +688,7 @@ trait Base array } }'; - case self::$CREATE_FLOAT_ATTRIBUTE: + case self::CREATE_FLOAT_ATTRIBUTE: return 'mutation createFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ databasesCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key @@ -699,7 +699,7 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_ATTRIBUTE: + case self::CREATE_BOOLEAN_ATTRIBUTE: return 'mutation createBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key @@ -708,7 +708,7 @@ trait Base array } }'; - case self::$CREATE_URL_ATTRIBUTE: + case self::CREATE_URL_ATTRIBUTE: return 'mutation createUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key @@ -717,7 +717,7 @@ trait Base array } }'; - case self::$CREATE_EMAIL_ATTRIBUTE: + case self::CREATE_EMAIL_ATTRIBUTE: return 'mutation createEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key @@ -726,7 +726,7 @@ trait Base array } }'; - case self::$CREATE_IP_ATTRIBUTE: + case self::CREATE_IP_ATTRIBUTE: return 'mutation createIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key @@ -735,7 +735,7 @@ trait Base array } }'; - case self::$CREATE_ENUM_ATTRIBUTE: + case self::CREATE_ENUM_ATTRIBUTE: return 'mutation createEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key @@ -745,7 +745,7 @@ trait Base array } }'; - case self::$CREATE_DATETIME_ATTRIBUTE: + case self::CREATE_DATETIME_ATTRIBUTE: return 'mutation createDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ databasesCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key @@ -754,7 +754,7 @@ trait Base array } }'; - case self::$CREATE_RELATIONSHIP_ATTRIBUTE: + case self::CREATE_RELATIONSHIP_ATTRIBUTE: return 'mutation createRelationshipAttribute($databaseId: String!, $collectionId: String!, $relatedCollectionId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ databasesCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedCollection @@ -765,14 +765,14 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_ATTRIBUTE: + case self::UPDATE_STRING_ATTRIBUTE: return 'mutation updateStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ databasesUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_INTEGER_ATTRIBUTE: + case self::UPDATE_INTEGER_ATTRIBUTE: return 'mutation updateIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ databasesUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { required @@ -781,7 +781,7 @@ trait Base default } }'; - case self::$UPDATE_FLOAT_ATTRIBUTE: + case self::UPDATE_FLOAT_ATTRIBUTE: return 'mutation updateFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ databasesUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { required @@ -790,35 +790,35 @@ trait Base default } }'; - case self::$UPDATE_BOOLEAN_ATTRIBUTE: + case self::UPDATE_BOOLEAN_ATTRIBUTE: return 'mutation updateBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean){ databasesUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_URL_ATTRIBUTE: + case self::UPDATE_URL_ATTRIBUTE: return 'mutation updateUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ databasesUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_EMAIL_ATTRIBUTE: + case self::UPDATE_EMAIL_ATTRIBUTE: return 'mutation updateEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ databasesUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_IP_ATTRIBUTE: + case self::UPDATE_IP_ATTRIBUTE: return 'mutation updateIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ databasesUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_ENUM_ATTRIBUTE: + case self::UPDATE_ENUM_ATTRIBUTE: return 'mutation updateEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ databasesUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { elements @@ -826,14 +826,14 @@ trait Base default } }'; - case self::$UPDATE_DATETIME_ATTRIBUTE: + case self::UPDATE_DATETIME_ATTRIBUTE: return 'mutation updateDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ databasesUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_RELATIONSHIP_ATTRIBUTE: + case self::UPDATE_RELATIONSHIP_ATTRIBUTE: return 'mutation updateRelationshipAttribute($databaseId: String!, $collectionId: String!, $key: String!, $onDelete: String){ databasesUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { relatedCollection @@ -844,18 +844,18 @@ trait Base onDelete } }'; - case self::$CREATE_STRING_COLUMN: + case self::CREATE_STRING_COLUMN: return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + tablesDbCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_INTEGER_COLUMN: + case self::CREATE_INTEGER_COLUMN: return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + tablesDbCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -864,9 +864,9 @@ trait Base array } }'; - case self::$CREATE_FLOAT_COLUMN: + case self::CREATE_FLOAT_COLUMN: return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - gridsCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + tablesDbCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -875,45 +875,45 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_COLUMN: + case self::CREATE_BOOLEAN_COLUMN: return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDbCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_URL_COLUMN: + case self::CREATE_URL_COLUMN: return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDbCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_EMAIL_COLUMN: + case self::CREATE_EMAIL_COLUMN: return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDbCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_IP_COLUMN: + case self::CREATE_IP_COLUMN: return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDbCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_ENUM_COLUMN: + case self::CREATE_ENUM_COLUMN: return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + tablesDbCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -921,18 +921,18 @@ trait Base array } }'; - case self::$CREATE_DATETIME_COLUMN: + case self::CREATE_DATETIME_COLUMN: return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - gridsCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + tablesDbCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_RELATIONSHIP_COLUMN: + case self::CREATE_RELATIONSHIP_COLUMN: return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - gridsCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + tablesDbCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedTable relationType twoWay @@ -941,77 +941,77 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_COLUMN: + case self::UPDATE_STRING_COLUMN: return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_INTEGER_COLUMN: + case self::UPDATE_INTEGER_COLUMN: return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - gridsUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + tablesDbUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max default } }'; - case self::$UPDATE_FLOAT_COLUMN: + case self::UPDATE_FLOAT_COLUMN: return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - gridsUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + tablesDbUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max default } }'; - case self::$UPDATE_BOOLEAN_COLUMN: + case self::UPDATE_BOOLEAN_COLUMN: return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - gridsUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_URL_COLUMN: + case self::UPDATE_URL_COLUMN: return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_EMAIL_COLUMN: + case self::UPDATE_EMAIL_COLUMN: return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_IP_COLUMN: + case self::UPDATE_IP_COLUMN: return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_ENUM_COLUMN: + case self::UPDATE_ENUM_COLUMN: return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - gridsUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + tablesDbUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { elements required default } }'; - case self::$UPDATE_DATETIME_COLUMN: + case self::UPDATE_DATETIME_COLUMN: return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - gridsUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + tablesDbUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_RELATIONSHIP_COLUMN: + case self::UPDATE_RELATIONSHIP_COLUMN: return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ - gridsUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { + tablesDbUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { relatedTable relationType twoWay @@ -1020,7 +1020,7 @@ trait Base onDelete } }'; - case self::$CREATE_INDEX: + case self::CREATE_INDEX: return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ databasesCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { key @@ -1028,7 +1028,7 @@ trait Base status } }'; - case self::$GET_INDEXES: + case self::GET_INDEXES: return 'query listIndexes($databaseId: String!, $collectionId: String!) { databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1039,7 +1039,7 @@ trait Base } } }'; - case self::$GET_INDEX: + case self::GET_INDEX: return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { key @@ -1047,23 +1047,23 @@ trait Base status } }'; - case self::$DELETE_INDEX: + case self::DELETE_INDEX: return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; - case self::$CREATE_COLUMN_INDEX: + case self::CREATE_COLUMN_INDEX: return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ - gridsCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { + tablesDbCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status } }'; - case self::$GET_COLUMN_INDEXES: + case self::GET_COLUMN_INDEXES: return 'query listIndexes($databaseId: String!, $tableId: String!) { - gridsListIndexes(databaseId: $databaseId, tableId: $tableId) { + tablesDbListIndexes(databaseId: $databaseId, tableId: $tableId) { total indexes { key @@ -1072,21 +1072,21 @@ trait Base } } }'; - case self::$GET_COLUMN_INDEX: + case self::GET_COLUMN_INDEX: return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { - gridsGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDbGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { key type status } }'; - case self::$DELETE_COLUMN_INDEX: + case self::DELETE_COLUMN_INDEX: return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { - gridsDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDbDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_ATTRIBUTES: + case self::GET_ATTRIBUTES: return 'query listAttributes($databaseId: String!, $collectionId: String!) { databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1094,42 +1094,42 @@ trait Base ...attributeProperties } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$GET_ATTRIBUTE: + }' . PHP_EOL . self::FRAGMENT_ATTRIBUTES; + case self::GET_ATTRIBUTE: return 'query getAttribute($databaseId: String!, $collectionId: String!, $key: String!) { databasesGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { ...attributeProperties } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$DELETE_ATTRIBUTE: + }' . PHP_EOL . self::FRAGMENT_ATTRIBUTES; + case self::DELETE_ATTRIBUTE: return 'mutation deleteAttribute($databaseId: String!, $collectionId: String!, $key: String!) { databasesDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; - case self::$GET_COLUMNS: + case self::GET_COLUMNS: return 'query listColumns($databaseId: String!, $tableId: String!) { - gridsListColumns(databaseId: $databaseId, tableId: $tableId) { + tablesDbListColumns(databaseId: $databaseId, tableId: $tableId) { total columns { ...columnProperties } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$GET_COLUMN: + }' . PHP_EOL . self::FRAGMENT_COLUMNS; + case self::GET_COLUMN: return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { - gridsGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDbGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { ...columnProperties } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$DELETE_COLUMN: + }' . PHP_EOL . self::FRAGMENT_COLUMNS; + case self::DELETE_COLUMN: return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { - gridsDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + tablesDbDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_DOCUMENT: + case self::GET_DOCUMENT: return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { _id @@ -1138,7 +1138,7 @@ trait Base data } }'; - case self::$GET_DOCUMENTS: + case self::GET_DOCUMENTS: return 'query listDocuments($databaseId: String!, $collectionId: String!){ databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { total @@ -1150,7 +1150,7 @@ trait Base } } }'; - case self::$CREATE_DOCUMENT: + case self::CREATE_DOCUMENT: return 'mutation createDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ databasesCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id @@ -1158,7 +1158,7 @@ trait Base _permissions } }'; - case self::$CREATE_DOCUMENTS: + case self::CREATE_DOCUMENTS: return 'mutation createDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { databasesCreateDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { documents { @@ -1169,9 +1169,9 @@ trait Base } } }'; - case self::$CREATE_ROWS: + case self::CREATE_ROWS: return 'mutation createRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - gridsCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + tablesDbCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { rows { _id _tableId @@ -1180,18 +1180,18 @@ trait Base } } }'; - case self::$GET_ROW: + case self::GET_ROW: return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { - gridsGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + tablesDbGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id _tableId _permissions data } }'; - case self::$GET_ROWS: + case self::GET_ROWS: return 'query listRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - gridsListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + tablesDbListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1202,15 +1202,15 @@ trait Base } } }'; - case self::$CREATE_ROW: + case self::CREATE_ROW: return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - gridsCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDbCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId _permissions } }'; - case self::$CREATE_CUSTOM_ENTITY: + case self::CREATE_CUSTOM_ENTITY: return 'mutation createActor($name: String!, $age: Int!, $alive: Boolean!, $salary: Float, $email: String!, $role: String!, $dob: String!, $ip: String, $url: String){ actorsCreate(name: $name, age: $age, alive: $alive, salary: $salary, email: $email, role: $role, dob: $dob, ip: $ip, url: $url) { _id @@ -1222,7 +1222,7 @@ trait Base role } }'; - case self::$GET_CUSTOM_ENTITIES: + case self::GET_CUSTOM_ENTITIES: return 'query getCustomEntities { actorsList { _id @@ -1237,7 +1237,7 @@ trait Base url } }'; - case self::$GET_CUSTOM_ENTITY: + case self::GET_CUSTOM_ENTITY: return 'query getCustomEntity($id: String!) { actorsGet(id: $id) { name @@ -1251,7 +1251,7 @@ trait Base url } }'; - case self::$UPDATE_CUSTOM_ENTITY: + case self::UPDATE_CUSTOM_ENTITY: return 'mutation updateCustomEntity($id: String!, $name: String, $age: Int, $alive: Boolean, $salary: Float, $email: String, $role: String, $dob: String, $ip: String, $url: String){ actorsUpdate(id: $id, name: $name, age: $age, alive: $alive, salary: $salary, email: $email, role: $role, dob: $dob, ip: $ip, url: $url) { name @@ -1265,11 +1265,11 @@ trait Base url } }'; - case self::$DELETE_CUSTOM_ENTITY: + case self::DELETE_CUSTOM_ENTITY: return 'mutation deleteCustomEntity($id: String!){ actorsDelete(id: $id) }'; - case self::$UPDATE_DOCUMENT: + case self::UPDATE_DOCUMENT: return 'mutation updateDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ databasesUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id @@ -1277,7 +1277,7 @@ trait Base data } }'; - case self::$UPSERT_DOCUMENT: + case self::UPSERT_DOCUMENT: return 'mutation upsertDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!] = []) { databasesUpsertDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id @@ -1286,7 +1286,7 @@ trait Base data } }'; - case self::$UPDATE_DOCUMENTS: + case self::UPDATE_DOCUMENTS: return 'mutation updateDocuments($databaseId: String!, $collectionId: String!, $data: Json!, $queries: [String!]) { databasesUpdateDocuments(databaseId: $databaseId, collectionId: $collectionId, data: $data, queries: $queries) { total @@ -1299,7 +1299,7 @@ trait Base } } }'; - case self::$UPSERT_DOCUMENTS: + case self::UPSERT_DOCUMENTS: return 'mutation upsertDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { databasesUpsertDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { total @@ -1312,7 +1312,7 @@ trait Base } } }'; - case self::$DELETE_DOCUMENTS: + case self::DELETE_DOCUMENTS: return 'mutation deleteDocuments($databaseId: String!, $collectionId: String!, $queries: [String!] = []) { databasesDeleteDocuments(databaseId: $databaseId, collectionId: $collectionId, queries: $queries) { total @@ -1324,38 +1324,38 @@ trait Base } } }'; - case self::$DELETE_DOCUMENT: + case self::DELETE_DOCUMENT: return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { status } }'; - case self::$UPDATE_ROW: + case self::UPDATE_ROW: return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - gridsUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDbUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId data } }'; - case self::$UPSERT_ROW: + case self::UPSERT_ROW: return 'mutation upsertRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!] = []) { - gridsUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + tablesDbUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _databaseId _tableId data } }'; - case self::$DELETE_ROW: + case self::DELETE_ROW: return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { - gridsDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + tablesDbDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; - case self::$UPDATE_ROWS: + case self::UPDATE_ROWS: return 'mutation updateRows($databaseId: String!, $tableId: String!, $data: Json!, $queries: [String!]) { - gridsUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { + tablesDbUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { total rows { _id @@ -1366,9 +1366,9 @@ trait Base } } }'; - case self::$UPSERT_ROWS: + case self::UPSERT_ROWS: return 'mutation upsertRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - gridsUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + tablesDbUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { total rows { _id @@ -1379,9 +1379,9 @@ trait Base } } }'; - case self::$DELETE_ROWS: + case self::DELETE_ROWS: return 'mutation deleteRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - gridsDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + tablesDbDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1391,7 +1391,7 @@ trait Base } } }'; - case self::$GET_USER: + case self::GET_USER: return 'query getUser($userId : String!) { usersGet(userId : $userId) { _id @@ -1405,14 +1405,14 @@ trait Base ...options } } - }' . PHP_EOL . self::$FRAGMENT_HASH_OPTIONS; - case self::$GET_USER_PREFERENCES: + }' . PHP_EOL . self::FRAGMENT_HASH_OPTIONS; + case self::GET_USER_PREFERENCES: return 'query getUserPreferences($userId : String!) { usersGetPrefs(userId : $userId) { data } }'; - case self::$GET_USER_SESSIONS: + case self::GET_USER_SESSIONS: return 'query listUserSessions($userId : String!) { usersListSessions(userId : $userId) { total @@ -1422,7 +1422,7 @@ trait Base } } }'; - case self::$GET_USER_MEMBERSHIPS: + case self::GET_USER_MEMBERSHIPS: return 'query listUserMemberships($userId : String!) { usersListMemberships(userId : $userId) { total @@ -1433,7 +1433,7 @@ trait Base } } }'; - case self::$GET_USER_LOGS: + case self::GET_USER_LOGS: return 'query listUserLogs($userId : String!) { usersListLogs(userId : $userId) { total @@ -1443,7 +1443,7 @@ trait Base } } }'; - case self::$GET_USERS: + case self::GET_USERS: return 'query listUsers($queries: [String!], $search: String) { usersList(queries: $queries, search: $search) { total @@ -1457,7 +1457,7 @@ trait Base } } }'; - case self::$CREATE_USER: + case self::CREATE_USER: return 'mutation createUser($userId: String!, $email: String!, $password: String!, $name: String){ usersCreate(userId: $userId, email: $email, password: $password, name: $name) { _id @@ -1468,7 +1468,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_STATUS: + case self::UPDATE_USER_STATUS: return 'mutation updateUserStatus($userId: String!, $status: Boolean!){ usersUpdateStatus(userId: $userId, status: $status) { _id @@ -1476,7 +1476,7 @@ trait Base email } }'; - case self::$UPDATE_USER_NAME: + case self::UPDATE_USER_NAME: return 'mutation updateUserName($userId: String!, $name: String!){ usersUpdateName(userId: $userId, name: $name) { _id @@ -1487,7 +1487,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_EMAIL: + case self::UPDATE_USER_EMAIL: return 'mutation updateUserEmail($userId: String!, $email: String!){ usersUpdateEmail(userId: $userId, email: $email) { _id @@ -1498,7 +1498,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_PASSWORD: + case self::UPDATE_USER_PASSWORD: return 'mutation updateUserPassword($userId: String!, $password: String!){ usersUpdatePassword(userId: $userId, password: $password) { _id @@ -1509,7 +1509,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_USER_PHONE: + case self::UPDATE_USER_PHONE: return 'mutation updateUserPhone($userId: String!, $number: String!){ usersUpdatePhone(userId: $userId, number: $number) { name @@ -1517,20 +1517,20 @@ trait Base email } }'; - case self::$UPDATE_USER_PREFS: + case self::UPDATE_USER_PREFS: return 'mutation updateUserPrefs($userId: String!, $prefs: Assoc!){ usersUpdatePrefs(userId: $userId, prefs: $prefs) { data } }'; - case self::$UPDATE_USER_EMAIL_VERIFICATION: + case self::UPDATE_USER_EMAIL_VERIFICATION: return 'mutation updateUserEmailVerification($userId: String!, $emailVerification: Boolean!){ usersUpdateEmailVerification(userId: $userId, emailVerification: $emailVerification) { name email } }'; - case self::$UPDATE_USER_PHONE_VERIFICATION: + case self::UPDATE_USER_PHONE_VERIFICATION: return 'mutation updateUserPhoneVerification($userId: String!, $phoneVerification: Boolean!){ usersUpdatePhoneVerification(userId: $userId, phoneVerification: $phoneVerification) { _id @@ -1538,25 +1538,25 @@ trait Base email } }'; - case self::$DELETE_USER_SESSIONS: + case self::DELETE_USER_SESSIONS: return 'mutation deleteUserSessions($userId: String!){ usersDeleteSessions(userId: $userId) { status } }'; - case self::$DELETE_USER_SESSION: + case self::DELETE_USER_SESSION: return 'mutation deleteUserSession($userId: String!, $sessionId: String!){ usersDeleteSession(userId: $userId, sessionId: $sessionId) { status } }'; - case self::$DELETE_USER: + case self::DELETE_USER: return 'mutation deleteUser($userId: String!) { usersDelete(userId: $userId) { status } }'; - case self::$CREATE_USER_TARGET: + case self::CREATE_USER_TARGET: return 'mutation createUserTarget($userId: String!, $targetId: String!, $providerType: String!, $identifier: String! $providerId: String){ usersCreateTarget(userId: $userId, targetId: $targetId, providerType: $providerType, identifier: $identifier, providerId: $providerId) { _id @@ -1566,7 +1566,7 @@ trait Base identifier } }'; - case self::$LIST_USER_TARGETS: + case self::LIST_USER_TARGETS: return 'query listUserTargets($userId: String!) { usersListTargets(userId: $userId) { total @@ -1579,7 +1579,7 @@ trait Base } } }'; - case self::$GET_USER_TARGET: + case self::GET_USER_TARGET: return 'query getUserTarget($userId: String!, $targetId: String!) { usersGetTarget(userId: $userId, targetId: $targetId) { _id @@ -1589,7 +1589,7 @@ trait Base identifier } }'; - case self::$UPDATE_USER_TARGET: + case self::UPDATE_USER_TARGET: return 'mutation updateUserTarget($userId: String!, $targetId: String!, $providerId: String, $identifier: String){ usersUpdateTarget(userId: $userId, targetId: $targetId, providerId: $providerId, identifier: $identifier) { _id @@ -1599,13 +1599,13 @@ trait Base identifier } }'; - case self::$DELETE_USER_TARGET: + case self::DELETE_USER_TARGET: return 'mutation deleteUserTarget($userId: String!, $targetId: String!){ usersDeleteTarget(userId: $userId, targetId: $targetId) { status } }'; - case self::$GET_LOCALE: + case self::GET_LOCALE: return 'query getLocale { localeGet { ip @@ -1614,7 +1614,7 @@ trait Base currency } }'; - case self::$LIST_COUNTRIES: + case self::LIST_COUNTRIES: return 'query listCountries { localeListCountries{ total @@ -1624,7 +1624,7 @@ trait Base } } }'; - case self::$LIST_EU_COUNTRIES: + case self::LIST_EU_COUNTRIES: return 'query listEuCountries { localeListCountriesEU{ total @@ -1634,7 +1634,7 @@ trait Base } } }'; - case self::$LIST_COUNTRY_PHONE_CODES: + case self::LIST_COUNTRY_PHONE_CODES: return 'query listCountryPhoneCodes { localeListCountriesPhones { total @@ -1644,7 +1644,7 @@ trait Base } } }'; - case self::$LIST_CONTINENTS: + case self::LIST_CONTINENTS: return 'query listContinents { localeListContinents{ total @@ -1654,7 +1654,7 @@ trait Base } } }'; - case self::$LIST_CURRENCIES: + case self::LIST_CURRENCIES: return 'query listCurrencies { localeListCurrencies{ total @@ -1665,7 +1665,7 @@ trait Base } } }'; - case self::$LIST_LANGUAGES: + case self::LIST_LANGUAGES: return 'query listLanguages { localeListLanguages{ total @@ -1675,49 +1675,49 @@ trait Base } } }'; - case self::$GET_CREDIT_CARD_ICON: + case self::GET_CREDIT_CARD_ICON: return 'query getCreditCardIcon($code: String!) { avatarsGetCreditCard(code: $code) { status } }'; - case self::$GET_BROWSER_ICON: + case self::GET_BROWSER_ICON: return 'query getBrowserIcon($code: String!) { avatarsGetBrowser(code: $code) { status } }'; - case self::$GET_COUNTRY_FLAG: + case self::GET_COUNTRY_FLAG: return 'query getCountryFlag($code: String!) { avatarsGetFlag(code: $code) { status } }'; - case self::$GET_IMAGE_FROM_URL: + case self::GET_IMAGE_FROM_URL: return 'query getImageFromUrl($url: String!) { avatarsGetImage(url: $url) { status } }'; - case self::$GET_FAVICON: + case self::GET_FAVICON: return 'query getFavicon($url: String!) { avatarsGetFavicon(url: $url) { status } }'; - case self::$GET_QRCODE: + case self::GET_QRCODE: return 'query getQrCode($text: String!) { avatarsGetQR(text: $text) { status } }'; - case self::$GET_USER_INITIALS: + case self::GET_USER_INITIALS: return 'query getUserInitials($name: String!) { avatarsGetInitials(name: $name) { status } }'; - case self::$GET_ACCOUNT: + case self::GET_ACCOUNT: return 'query getAccount { accountGet { _id @@ -1728,7 +1728,7 @@ trait Base emailVerification } }'; - case self::$CREATE_ACCOUNT: + case self::CREATE_ACCOUNT: return 'mutation createAccount($userId: String!, $email: String!, $password: String!, $name: String){ accountCreate(userId: $userId, email: $email, password: $password, name: $name) { _id @@ -1739,7 +1739,7 @@ trait Base emailVerification } }'; - case self::$UPDATE_ACCOUNT_NAME: + case self::UPDATE_ACCOUNT_NAME: return 'mutation updateAccountName($name: String!){ accountUpdateName(name: $name) { _id @@ -1749,7 +1749,7 @@ trait Base phone } }'; - case self::$UPDATE_ACCOUNT_EMAIL: + case self::UPDATE_ACCOUNT_EMAIL: return 'mutation updateAccountEmail($email: String!, $password: String!){ accountUpdateEmail(email: $email, password: $password) { _id @@ -1758,7 +1758,7 @@ trait Base email } }'; - case self::$UPDATE_ACCOUNT_PASSWORD: + case self::UPDATE_ACCOUNT_PASSWORD: return 'mutation updateAccountPassword($password: String!, $oldPassword: String!){ accountUpdatePassword(password: $password, oldPassword: $oldPassword) { _id @@ -1767,7 +1767,7 @@ trait Base email } }'; - case self::$UPDATE_ACCOUNT_PHONE: + case self::UPDATE_ACCOUNT_PHONE: return 'mutation updateAccountPhone($phone: String!, $password: String!){ accountUpdatePhone(phone: $phone, password: $password) { _id @@ -1777,7 +1777,7 @@ trait Base phone } }'; - case self::$UPDATE_ACCOUNT_PREFS: + case self::UPDATE_ACCOUNT_PREFS: return 'mutation updateAccountPrefs($prefs: Assoc!){ accountUpdatePrefs(prefs: $prefs) { _id @@ -1791,21 +1791,21 @@ trait Base } } }'; - case self::$UPDATE_ACCOUNT_STATUS: + case self::UPDATE_ACCOUNT_STATUS: return 'mutation updateAccountStatus{ accountUpdateStatus { status email } }'; - case self::$GET_ACCOUNT_SESSION: + case self::GET_ACCOUNT_SESSION: return 'query getAccountSession($sessionId: String!) { accountGetSession(sessionId: $sessionId) { _id userId } }'; - case self::$CREATE_ACCOUNT_SESSION: + case self::CREATE_ACCOUNT_SESSION: return 'mutation createAccountEmailSession($email: String!, $password: String!){ accountCreateEmailPasswordSession(email: $email, password: $password) { _id @@ -1815,26 +1815,26 @@ trait Base current } }'; - case self::$DELETE_ACCOUNT_SESSION: + case self::DELETE_ACCOUNT_SESSION: return 'mutation deleteAccountSession($sessionId: String!){ accountDeleteSession(sessionId: $sessionId) { status } }'; - case self::$DELETE_ACCOUNT_SESSIONS: + case self::DELETE_ACCOUNT_SESSIONS: return 'mutation deleteAccountSessions { accountDeleteSessions { status } }'; - case self::$CREATE_MAGIC_URL: + case self::CREATE_MAGIC_URL: return 'mutation createMagicURL($userId: String!, $email: String!){ accountCreateMagicURLToken(userId: $userId, email: $email) { userId expire } }'; - case self::$UPDATE_MAGIC_URL: + case self::UPDATE_MAGIC_URL: return 'mutation confirmMagicURL($userId: String!, $secret: String!){ accountUpdateMagicURLSession(userId: $userId, secret: $secret) { userId @@ -1843,26 +1843,26 @@ trait Base ip } }'; - case self::$CREATE_ANONYMOUS_SESSION: + case self::CREATE_ANONYMOUS_SESSION: return 'mutation createAnonymousSession { accountCreateAnonymousSession { _id userId } }'; - case self::$CREATE_ACCOUNT_JWT: + case self::CREATE_ACCOUNT_JWT: return 'mutation createJWT{ accountCreateJWT { jwt } }'; - case self::$GET_ACCOUNT_PREFS: + case self::GET_ACCOUNT_PREFS: return 'query getAccountPreferences { accountGetPrefs { data } }'; - case self::$GET_ACCOUNT_SESSIONS: + case self::GET_ACCOUNT_SESSIONS: return 'query listAccountSessions { accountListSessions { total @@ -1873,7 +1873,7 @@ trait Base } } }'; - case self::$GET_ACCOUNT_LOGS: + case self::GET_ACCOUNT_LOGS: return 'query getAccountLogs { accountListLogs { total @@ -1885,7 +1885,7 @@ trait Base } } }'; - case self::$CREATE_PASSWORD_RECOVERY: + case self::CREATE_PASSWORD_RECOVERY: return 'mutation createPasswordRecovery($email: String!, $url: String!){ accountCreateRecovery(email: $email, url: $url) { userId @@ -1893,7 +1893,7 @@ trait Base expire } }'; - case self::$UPDATE_PASSWORD_RECOVERY: + case self::UPDATE_PASSWORD_RECOVERY: return 'mutation confirmPasswordRecovery($userId: String!, $secret: String!, $password: String!) { accountUpdateRecovery(userId: $userId, secret: $secret, password: $password) { userId @@ -1901,7 +1901,7 @@ trait Base expire } }'; - case self::$CREATE_EMAIL_VERIFICATION: + case self::CREATE_EMAIL_VERIFICATION: return 'mutation createVerification($url: String!){ accountCreateVerification(url: $url) { userId @@ -1909,7 +1909,7 @@ trait Base expire } }'; - case self::$UPDATE_EMAIL_VERIFICATION: + case self::UPDATE_EMAIL_VERIFICATION: return 'mutation confirmVerification($userId: String!, $secret: String!) { accountUpdateVerification(userId: $userId, secret: $secret) { userId @@ -1917,7 +1917,7 @@ trait Base expire } }'; - case self::$CREATE_PHONE_VERIFICATION: + case self::CREATE_PHONE_VERIFICATION: return 'mutation createPhoneVerification { accountCreatePhoneVerification { userId @@ -1925,7 +1925,7 @@ trait Base expire } }'; - case self::$UPDATE_PHONE_VERIFICATION: + case self::UPDATE_PHONE_VERIFICATION: return 'mutation confirmPhoneVerification($userId: String!, $phoneVerification: Boolean!) { accountUpdatePhoneVerification(userId: $userId, phoneVerification: $phoneVerification) { userId @@ -1933,7 +1933,7 @@ trait Base expire } }'; - case self::$GET_TEAM: + case self::GET_TEAM: return 'query getTeam($teamId: String!){ teamsGet(teamId: $teamId) { _id @@ -1941,13 +1941,13 @@ trait Base total } }'; - case self::$GET_TEAM_PREFERENCES: + case self::GET_TEAM_PREFERENCES: return 'query getTeamPreferences($teamId: String!) { teamsGetPrefs(teamId: $teamId) { data } }'; - case self::$GET_TEAMS: + case self::GET_TEAMS: return 'query listTeams { teamsList { total @@ -1957,7 +1957,7 @@ trait Base } } }'; - case self::$CREATE_TEAM: + case self::CREATE_TEAM: return 'mutation createTeam($teamId: String!, $name: String!, $roles: [String]){ teamsCreate(teamId: $teamId, name : $name, roles: $roles) { _id @@ -1965,7 +1965,7 @@ trait Base total } }'; - case self::$UPDATE_TEAM_NAME: + case self::UPDATE_TEAM_NAME: return 'mutation updateTeamName($teamId: String!, $name: String!){ teamsUpdateName(teamId: $teamId, name : $name) { _id @@ -1973,19 +1973,19 @@ trait Base total } }'; - case self::$UPDATE_TEAM_PREFERENCES: + case self::UPDATE_TEAM_PREFERENCES: return 'mutation updateTeamPrefs($teamId: String!, $prefs: Assoc!){ teamsUpdatePrefs(teamId: $teamId, prefs: $prefs) { data } }'; - case self::$DELETE_TEAM: + case self::DELETE_TEAM: return 'mutation deleteTeam($teamId: String!){ teamsDelete(teamId: $teamId) { status } }'; - case self::$GET_TEAM_MEMBERSHIP: + case self::GET_TEAM_MEMBERSHIP: return 'query getTeamMembership($teamId: String!, $membershipId: String!){ teamsGetMembership(teamId: $teamId, membershipId: $membershipId) { _id @@ -1995,7 +1995,7 @@ trait Base userEmail } }'; - case self::$GET_TEAM_MEMBERSHIPS: + case self::GET_TEAM_MEMBERSHIPS: return 'query listTeamMemberships($teamId: String!){ teamsListMemberships(teamId: $teamId) { total @@ -2008,7 +2008,7 @@ trait Base } } }'; - case self::$CREATE_TEAM_MEMBERSHIP: + case self::CREATE_TEAM_MEMBERSHIP: return 'mutation createTeamMembership($teamId: String!, $email: String!, $name: String, $roles: [String!]!, $url: String!){ teamsCreateMembership(teamId: $teamId, email: $email, name : $name, roles: $roles, url: $url) { _id @@ -2022,7 +2022,7 @@ trait Base roles } }'; - case self::$UPDATE_TEAM_MEMBERSHIP: + case self::UPDATE_TEAM_MEMBERSHIP: return 'mutation updateTeamMembership($teamId: String!, $membershipId: String!, $roles: [String!]!){ teamsUpdateMembership(teamId: $teamId, membershipId: $membershipId, roles: $roles) { _id @@ -2036,7 +2036,7 @@ trait Base roles } }'; - case self::$UPDATE_TEAM_MEMBERSHIP_STATUS: + case self::UPDATE_TEAM_MEMBERSHIP_STATUS: return 'mutation updateTeamMembership($teamId: String!, $membershipId: String!, $userId: String!, $secret: String!){ teamsUpdateMembershipStatus(teamId: $teamId, membershipId: $membershipId, userId: $userId, secret: $secret ) { _id @@ -2050,13 +2050,13 @@ trait Base roles } }'; - case self::$DELETE_TEAM_MEMBERSHIP: + case self::DELETE_TEAM_MEMBERSHIP: return 'mutation deleteTeamMembership($teamId: String!, $membershipId: String!){ teamsDeleteMembership(teamId: $teamId, membershipId: $membershipId) { status } }'; - case self::$GET_FUNCTION: + case self::GET_FUNCTION: return 'query getFunction($functionId: String!) { functionsGet(functionId: $functionId) { _id @@ -2065,7 +2065,7 @@ trait Base execute } }'; - case self::$GET_FUNCTIONS: + case self::GET_FUNCTIONS: return 'query listFunctions { functionsList { total @@ -2077,7 +2077,7 @@ trait Base } } }'; - case self::$GET_RUNTIMES: + case self::GET_RUNTIMES: return 'query listRuntimes { functionsListRuntimes { total @@ -2088,7 +2088,7 @@ trait Base } } }'; - case self::$GET_DEPLOYMENTS: + case self::GET_DEPLOYMENTS: return 'query listDeployments($functionId: String!) { functionsListDeployments(functionId: $functionId) { total @@ -2098,7 +2098,7 @@ trait Base } } }'; - case self::$GET_DEPLOYMENT: + case self::GET_DEPLOYMENT: return 'query getDeployment($functionId: String!, $deploymentId: String!) { functionsGetDeployment(functionId: $functionId, deploymentId: $deploymentId) { _id @@ -2108,7 +2108,7 @@ trait Base status } }'; - case self::$CREATE_FUNCTION: + case self::CREATE_FUNCTION: return 'mutation createFunction($functionId: String!, $name: String!, $runtime: String!, $execute: [String!]!, $events: [String], $schedule: String, $timeout: Int, $entrypoint: String!) { functionsCreate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, events: $events, schedule: $schedule, timeout: $timeout, entrypoint: $entrypoint) { _id @@ -2117,7 +2117,7 @@ trait Base execute } }'; - case self::$UPDATE_FUNCTION: + case self::UPDATE_FUNCTION: return 'mutation updateFunction($functionId: String!, $name: String!, $execute: [String!]!, $runtime: String!, $entrypoint: String!, $events: [String], $schedule: String, $timeout: Int) { functionsUpdate(functionId: $functionId, name: $name, execute: $execute, runtime: $runtime, entrypoint: $entrypoint, events: $events, schedule: $schedule, timeout: $timeout) { _id @@ -2126,7 +2126,7 @@ trait Base execute } }'; - case self::$UPDATE_DEPLOYMENT: + case self::UPDATE_DEPLOYMENT: return 'mutation updateFunctionDeployment($functionId: String!, $deploymentId: String!) { functionsUpdateDeployment(functionId: $functionId, deploymentId: $deploymentId) { _id @@ -2135,13 +2135,13 @@ trait Base execute } }'; - case self::$DELETE_FUNCTION: + case self::DELETE_FUNCTION: return 'mutation deleteFunction($functionId: String!) { functionsDelete(functionId: $functionId) { status } }'; - case self::$CREATE_VARIABLE: + case self::CREATE_VARIABLE: return 'mutation createVariable($functionId: String!, $key: String!, $value: String!) { functionsCreateVariable(functionId: $functionId, key: $key, value: $value) { _id @@ -2149,7 +2149,7 @@ trait Base value } }'; - case self::$GET_VARIABLES: + case self::GET_VARIABLES: return 'query listVariables($functionId: String!) { functionsListVariables(functionId: $functionId) { total @@ -2160,7 +2160,7 @@ trait Base } } }'; - case self::$GET_VARIABLE: + case self::GET_VARIABLE: return 'query getVariable($functionId: String!, $variableId: String!) { functionsGetVariable(functionId: $functionId, variableId: $variableId) { _id @@ -2168,7 +2168,7 @@ trait Base value } }'; - case self::$UPDATE_VARIABLE: + case self::UPDATE_VARIABLE: return 'mutation updateVariable($functionId: String!, $variableId: String!, $key: String!, $value: String) { functionsUpdateVariable(functionId: $functionId, variableId: $variableId, key: $key, value: $value) { _id @@ -2176,13 +2176,13 @@ trait Base value } }'; - case self::$DELETE_VARIABLE: + case self::DELETE_VARIABLE: return 'mutation deleteVariable($functionId: String!, $variableId: String!) { functionsDeleteVariable(functionId: $functionId, variableId: $variableId) { status } }'; - case self::$CREATE_DEPLOYMENT: + case self::CREATE_DEPLOYMENT: return 'mutation createDeployment($functionId: String!, $code: InputFile!, $activate: Boolean!) { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate) { _id @@ -2193,13 +2193,13 @@ trait Base buildLogs } }'; - case self::$DELETE_DEPLOYMENT: + case self::DELETE_DEPLOYMENT: return 'mutation deleteDeployment($functionId: String!, $deploymentId: String!) { functionsDeleteDeployment(functionId: $functionId, deploymentId: $deploymentId) { status } }'; - case self::$GET_EXECUTION: + case self::GET_EXECUTION: return 'query getExecution($functionId: String!$executionId: String!) { functionsGetExecution(functionId: $functionId, executionId: $executionId) { _id @@ -2209,7 +2209,7 @@ trait Base errors } }'; - case self::$GET_EXECUTIONS: + case self::GET_EXECUTIONS: return 'query listExecutions($functionId: String!) { functionsListExecutions(functionId: $functionId) { total @@ -2222,7 +2222,7 @@ trait Base } } }'; - case self::$CREATE_EXECUTION: + case self::CREATE_EXECUTION: return 'mutation createExecution($functionId: String!, $body: String, $async: Boolean) { functionsCreateExecution(functionId: $functionId, body: $body, async: $async) { _id @@ -2232,19 +2232,19 @@ trait Base errors } }'; - case self::$DELETE_EXECUTION: + case self::DELETE_EXECUTION: return 'mutation deleteExecution($functionId: String!, $executionId: String!) { functionsDeleteExecution(functionId: $functionId, executionId: $executionId) { status } }'; - case self::$RETRY_BUILD: + case self::RETRY_BUILD: return 'mutation retryBuild($functionId: String!, $deploymentId: String!, $buildId: String!) { functionsCreateDuplicateDeployment(functionId: $functionId, deploymentId: $deploymentId, buildId: $buildId) { status } }'; - case self::$CREATE_BUCKET: + case self::CREATE_BUCKET: return 'mutation createBucket($bucketId: String!, $name: String!, $fileSecurity: Boolean, $permissions: [String!]) { storageCreateBucket(bucketId: $bucketId, name: $name, fileSecurity: $fileSecurity, permissions: $permissions) { _id @@ -2256,7 +2256,7 @@ trait Base fileSecurity } }'; - case self::$GET_BUCKETS: + case self::GET_BUCKETS: return 'query getBuckets { storageListBuckets { total @@ -2267,7 +2267,7 @@ trait Base } } }'; - case self::$GET_BUCKET: + case self::GET_BUCKET: return 'query getBucket($bucketId: String!) { storageGetBucket(bucketId: $bucketId) { _id @@ -2275,7 +2275,7 @@ trait Base enabled } }'; - case self::$UPDATE_BUCKET: + case self::UPDATE_BUCKET: return 'mutation updateBucket($bucketId: String!, $name: String!, $fileSecurity: Boolean, $permissions: [String!]) { storageUpdateBucket(bucketId: $bucketId, name: $name, fileSecurity: $fileSecurity, permissions: $permissions) { _id @@ -2283,13 +2283,13 @@ trait Base enabled } }'; - case self::$DELETE_BUCKET: + case self::DELETE_BUCKET: return 'mutation deleteBucket($bucketId: String!) { storageDeleteBucket(bucketId: $bucketId) { status } }'; - case self::$CREATE_FILE: + case self::CREATE_FILE: return 'mutation createFile($bucketId: String!, $fileId: String!, $file: InputFile!, $permissions: [String!]) { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { _id @@ -2297,7 +2297,7 @@ trait Base name } }'; - case self::$GET_FILES: + case self::GET_FILES: return 'query getFiles($bucketId: String!) { storageListFiles(bucketId: $bucketId) { total @@ -2307,66 +2307,66 @@ trait Base } } }'; - case self::$GET_FILE: + case self::GET_FILE: return 'query getFile($bucketId: String!, $fileId: String!) { storageGetFile(bucketId: $bucketId, fileId: $fileId) { _id name } }'; - case self::$GET_FILE_PREVIEW: + case self::GET_FILE_PREVIEW: return 'query getFilePreview($bucketId: String!, $fileId: String!) { storageGetFilePreview(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_FILE_DOWNLOAD: + case self::GET_FILE_DOWNLOAD: return 'query getFileDownload($bucketId: String!, $fileId: String!) { storageGetFileDownload(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_FILE_VIEW: + case self::GET_FILE_VIEW: return 'query getFileView($bucketId: String!, $fileId: String!) { storageGetFileView(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$UPDATE_FILE: + case self::UPDATE_FILE: return 'mutation updateFile($bucketId: String!, $fileId: String!, $permissions: [String!]) { storageUpdateFile(bucketId: $bucketId, fileId: $fileId, permissions: $permissions) { _id name } }'; - case self::$DELETE_FILE: + case self::DELETE_FILE: return 'mutation deleteFile($bucketId: String!, $fileId: String!) { storageDeleteFile(bucketId: $bucketId, fileId: $fileId) { status } }'; - case self::$GET_HTTP_HEALTH: + case self::GET_HTTP_HEALTH: return 'query getHttpHealth { healthGet { ping status } }'; - case self::$GET_DB_HEALTH: + case self::GET_DB_HEALTH: return 'query getDbHealth { healthGetDB { ping status } }'; - case self::$GET_CACHE_HEALTH: + case self::GET_CACHE_HEALTH: return 'query getCacheHealth { healthGetCache { ping status } }'; - case self::$GET_TIME_HEALTH: + case self::GET_TIME_HEALTH: return 'query getTimeHealth { healthGetTime { remoteTime @@ -2374,45 +2374,45 @@ trait Base diff } }'; - case self::$GET_WEBHOOKS_QUEUE_HEALTH: + case self::GET_WEBHOOKS_QUEUE_HEALTH: return 'query getWebhooksQueueHealth { healthGetQueueWebhooks { size } }'; - case self::$GET_LOGS_QUEUE_HEALTH: + case self::GET_LOGS_QUEUE_HEALTH: return 'query getLogsQueueHealth { healthGetQueueLogs { size } }'; - case self::$GET_CERTIFICATES_QUEUE_HEALTH: + case self::GET_CERTIFICATES_QUEUE_HEALTH: return 'query getCertificatesQueueHealth { healthGetQueueCertificates { size } }'; - case self::$GET_FUNCTION_QUEUE_HEALTH: + case self::GET_FUNCTION_QUEUE_HEALTH: return 'query getFunctionQueueHealth { healthGetQueueFunctions { size } }'; - case self::$GET_LOCAL_STORAGE_HEALTH: + case self::GET_LOCAL_STORAGE_HEALTH: return 'query getLocalStorageHealth { healthGetStorageLocal { ping status } }'; - case self::$GET_ANITVIRUS_HEALTH: + case self::GET_ANITVIRUS_HEALTH: return 'query getAntivirusHealth { healthGetAntivirus { version status } }'; - case self::$CREATE_MAILGUN_PROVIDER: + case self::CREATE_MAILGUN_PROVIDER: return 'mutation createMailgunProvider($providerId: String!, $name: String!, $domain: String!, $apiKey: String!, $fromName: String!, $fromEmail: String!, $isEuRegion: Boolean!, $replyToName: String, $replyToEmail: String) { messagingCreateMailgunProvider(providerId: $providerId, name: $name, domain: $domain, apiKey: $apiKey, fromName: $fromName, fromEmail: $fromEmail, isEuRegion: $isEuRegion, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2422,7 +2422,7 @@ trait Base enabled } }'; - case self::$CREATE_SENDGRID_PROVIDER: + case self::CREATE_SENDGRID_PROVIDER: return 'mutation createSendgridProvider($providerId: String!, $name: String!, $fromName: String!, $fromEmail: String!, $apiKey: String!, $replyToName: String, $replyToEmail: String) { messagingCreateSendgridProvider(providerId: $providerId, name: $name, fromName: $fromName, fromEmail: $fromEmail, apiKey: $apiKey, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2432,7 +2432,7 @@ trait Base enabled } }'; - case self::$CREATE_SMTP_PROVIDER: + case self::CREATE_SMTP_PROVIDER: return 'mutation createSmtpProvider($providerId: String!, $name: String!, $host: String!, $port: Int!, $username: String!, $password: String!, $encryption: String!, $autoTLS: Boolean! $fromName: String!, $fromEmail: String!, $replyToName: String, $replyToEmail: String) { messagingCreateSmtpProvider(providerId: $providerId, name: $name, host: $host, port: $port, username: $username, password: $password, encryption: $encryption, autoTLS: $autoTLS, fromName: $fromName, fromEmail: $fromEmail, replyToName: $replyToName, replyToEmail: $replyToEmail) { _id @@ -2442,7 +2442,7 @@ trait Base enabled } }'; - case self::$CREATE_TWILIO_PROVIDER: + case self::CREATE_TWILIO_PROVIDER: return 'mutation createTwilioProvider($providerId: String!, $name: String!, $from: String!, $accountSid: String!, $authToken: String!) { messagingCreateTwilioProvider(providerId: $providerId, name: $name, from: $from, accountSid: $accountSid, authToken: $authToken) { _id @@ -2452,7 +2452,7 @@ trait Base enabled } }'; - case self::$CREATE_TELESIGN_PROVIDER: + case self::CREATE_TELESIGN_PROVIDER: return 'mutation createTelesignProvider($providerId: String!, $name: String!, $from: String!, $customerId: String!, $apiKey: String!) { messagingCreateTelesignProvider(providerId: $providerId, name: $name, from: $from, customerId: $customerId, apiKey: $apiKey) { _id @@ -2462,7 +2462,7 @@ trait Base enabled } }'; - case self::$CREATE_TEXTMAGIC_PROVIDER: + case self::CREATE_TEXTMAGIC_PROVIDER: return 'mutation createTextmagicProvider($providerId: String!, $name: String!, $from: String!, $username: String!, $apiKey: String!) { messagingCreateTextmagicProvider(providerId: $providerId, name: $name, from: $from, username: $username, apiKey: $apiKey) { _id @@ -2472,7 +2472,7 @@ trait Base enabled } }'; - case self::$CREATE_MSG91_PROVIDER: + case self::CREATE_MSG91_PROVIDER: return 'mutation createMsg91Provider($providerId: String!, $name: String!, $templateId: String!, $senderId: String!, $authKey: String!, $enabled: Boolean) { messagingCreateMsg91Provider(providerId: $providerId, name: $name, templateId: $templateId, senderId: $senderId, authKey: $authKey, enabled: $enabled) { _id @@ -2482,7 +2482,7 @@ trait Base enabled } }'; - case self::$CREATE_VONAGE_PROVIDER: + case self::CREATE_VONAGE_PROVIDER: return 'mutation createVonageProvider($providerId: String!, $name: String!, $from: String!, $apiKey: String!, $apiSecret: String!) { messagingCreateVonageProvider(providerId: $providerId, name: $name, from: $from, apiKey: $apiKey, apiSecret: $apiSecret) { _id @@ -2492,7 +2492,7 @@ trait Base enabled } }'; - case self::$CREATE_FCM_PROVIDER: + case self::CREATE_FCM_PROVIDER: return 'mutation createFcmProvider($providerId: String!, $name: String!, $serviceAccountJSON: Json) { messagingCreateFcmProvider(providerId: $providerId, name: $name, serviceAccountJSON: $serviceAccountJSON) { _id @@ -2502,7 +2502,7 @@ trait Base enabled } }'; - case self::$CREATE_APNS_PROVIDER: + case self::CREATE_APNS_PROVIDER: return 'mutation createApnsProvider($providerId: String!, $name: String!, $authKey: String!, $authKeyId: String!, $teamId: String!, $bundleId: String!) { messagingCreateApnsProvider(providerId: $providerId, name: $name, authKey: $authKey, authKeyId: $authKeyId, teamId: $teamId, bundleId: $bundleId) { _id @@ -2512,7 +2512,7 @@ trait Base enabled } }'; - case self::$LIST_PROVIDERS: + case self::LIST_PROVIDERS: return 'query listProviders { messagingListProviders { total @@ -2526,7 +2526,7 @@ trait Base } } }'; - case self::$GET_PROVIDER: + case self::GET_PROVIDER: return 'query getProvider($providerId: String!) { messagingGetProvider(providerId: $providerId) { _id @@ -2536,7 +2536,7 @@ trait Base enabled } }'; - case self::$UPDATE_MAILGUN_PROVIDER: + case self::UPDATE_MAILGUN_PROVIDER: return 'mutation updateMailgunProvider($providerId: String!, $name: String!, $domain: String!, $apiKey: String!, $isEuRegion: Boolean, $enabled: Boolean, $fromName: String, $fromEmail: String) { messagingUpdateMailgunProvider(providerId: $providerId, name: $name, domain: $domain, apiKey: $apiKey, isEuRegion: $isEuRegion, enabled: $enabled, fromName: $fromName, fromEmail: $fromEmail) { _id @@ -2546,7 +2546,7 @@ trait Base enabled } }'; - case self::$UPDATE_SENDGRID_PROVIDER: + case self::UPDATE_SENDGRID_PROVIDER: return 'mutation messagingUpdateSendgridProvider($providerId: String!, $name: String!, $apiKey: String!, $enabled: Boolean, $fromName: String, $fromEmail: String) { messagingUpdateSendgridProvider(providerId: $providerId, name: $name, apiKey: $apiKey, enabled: $enabled, fromName: $fromName, fromEmail: $fromEmail) { _id @@ -2556,7 +2556,7 @@ trait Base enabled } }'; - case self::$UPDATE_SMTP_PROVIDER: + case self::UPDATE_SMTP_PROVIDER: return 'mutation updateSmtpProvider($providerId: String!, $name: String!, $host: String!, $port: Int!, $username: String!, $password: String!, $encryption: String!, $autoTLS: Boolean!, $fromName: String, $fromEmail: String, $enabled: Boolean) { messagingUpdateSmtpProvider(providerId: $providerId, name: $name, host: $host, port: $port, username: $username, password: $password, encryption: $encryption, autoTLS: $autoTLS, fromName: $fromName, fromEmail: $fromEmail, enabled: $enabled) { _id @@ -2566,7 +2566,7 @@ trait Base enabled } }'; - case self::$UPDATE_TWILIO_PROVIDER: + case self::UPDATE_TWILIO_PROVIDER: return 'mutation updateTwilioProvider($providerId: String!, $name: String!, $accountSid: String!, $authToken: String!) { messagingUpdateTwilioProvider(providerId: $providerId, name: $name, accountSid: $accountSid, authToken: $authToken) { _id @@ -2576,7 +2576,7 @@ trait Base enabled } }'; - case self::$UPDATE_TELESIGN_PROVIDER: + case self::UPDATE_TELESIGN_PROVIDER: return 'mutation updateTelesignProvider($providerId: String!, $name: String!, $customerId: String!, $apiKey: String!) { messagingUpdateTelesignProvider(providerId: $providerId, name: $name, customerId: $customerId, apiKey: $apiKey) { _id @@ -2586,7 +2586,7 @@ trait Base enabled } }'; - case self::$UPDATE_TEXTMAGIC_PROVIDER: + case self::UPDATE_TEXTMAGIC_PROVIDER: return 'mutation updateTextmagicProvider($providerId: String!, $name: String!, $username: String!, $apiKey: String!) { messagingUpdateTextmagicProvider(providerId: $providerId, name: $name, username: $username, apiKey: $apiKey) { _id @@ -2596,7 +2596,7 @@ trait Base enabled } }'; - case self::$UPDATE_MSG91_PROVIDER: + case self::UPDATE_MSG91_PROVIDER: return 'mutation updateMsg91Provider($providerId: String!, $name: String!, $templateId: String!, $senderId: String!, $authKey: String!) { messagingUpdateMsg91Provider(providerId: $providerId, name: $name, templateId: $templateId, senderId: $senderId, authKey: $authKey) { _id @@ -2606,7 +2606,7 @@ trait Base enabled } }'; - case self::$UPDATE_VONAGE_PROVIDER: + case self::UPDATE_VONAGE_PROVIDER: return 'mutation updateVonageProvider($providerId: String!, $name: String!, $apiKey: String!, $apiSecret: String!) { messagingUpdateVonageProvider(providerId: $providerId, name: $name, apiKey: $apiKey, apiSecret: $apiSecret) { _id @@ -2616,7 +2616,7 @@ trait Base enabled } }'; - case self::$UPDATE_FCM_PROVIDER: + case self::UPDATE_FCM_PROVIDER: return 'mutation updateFcmProvider($providerId: String!, $name: String!, $serviceAccountJSON: Json) { messagingUpdateFcmProvider(providerId: $providerId, name: $name, serviceAccountJSON: $serviceAccountJSON) { _id @@ -2626,7 +2626,7 @@ trait Base enabled } }'; - case self::$UPDATE_APNS_PROVIDER: + case self::UPDATE_APNS_PROVIDER: return 'mutation updateApnsProvider($providerId: String!, $name: String!, $authKey: String!, $authKeyId: String!, $teamId: String!, $bundleId: String!) { messagingUpdateApnsProvider(providerId: $providerId, name: $name, authKey: $authKey, authKeyId: $authKeyId, teamId: $teamId, bundleId: $bundleId) { _id @@ -2636,13 +2636,13 @@ trait Base enabled } }'; - case self::$DELETE_PROVIDER: + case self::DELETE_PROVIDER: return 'mutation deleteProvider($providerId: String!) { messagingDeleteProvider(providerId: $providerId) { status } }'; - case self::$CREATE_TOPIC: + case self::CREATE_TOPIC: return 'mutation createTopic($topicId: String!, $name: String!) { messagingCreateTopic(topicId: $topicId, name: $name) { _id @@ -2652,7 +2652,7 @@ trait Base pushTotal } }'; - case self::$LIST_TOPICS: + case self::LIST_TOPICS: return 'query listTopics { messagingListTopics { total @@ -2665,7 +2665,7 @@ trait Base } } }'; - case self::$GET_TOPIC: + case self::GET_TOPIC: return 'query getTopic($topicId: String!) { messagingGetTopic(topicId: $topicId) { _id @@ -2675,7 +2675,7 @@ trait Base pushTotal } }'; - case self::$UPDATE_TOPIC: + case self::UPDATE_TOPIC: return 'mutation updateTopic($topicId: String!, $name: String!) { messagingUpdateTopic(topicId: $topicId, name: $name) { _id @@ -2685,13 +2685,13 @@ trait Base pushTotal } }'; - case self::$DELETE_TOPIC: + case self::DELETE_TOPIC: return 'mutation deleteTopic($topicId: String!) { messagingDeleteTopic(topicId: $topicId) { status } }'; - case self::$CREATE_SUBSCRIBER: + case self::CREATE_SUBSCRIBER: return 'mutation createSubscriber($subscriberId: String!, $targetId: String!, $topicId: String!) { messagingCreateSubscriber(subscriberId: $subscriberId, targetId: $targetId, topicId: $topicId) { _id @@ -2707,7 +2707,7 @@ trait Base } } }'; - case self::$LIST_SUBSCRIBERS: + case self::LIST_SUBSCRIBERS: return 'query listSubscribers($topicId: String!) { messagingListSubscribers(topicId: $topicId) { total @@ -2726,7 +2726,7 @@ trait Base } } }'; - case self::$GET_SUBSCRIBER: + case self::GET_SUBSCRIBER: return 'query getSubscriber($topicId: String!, $subscriberId: String!) { messagingGetSubscriber(topicId: $topicId, subscriberId: $subscriberId) { _id @@ -2742,13 +2742,13 @@ trait Base } } }'; - case self::$DELETE_SUBSCRIBER: + case self::DELETE_SUBSCRIBER: return 'mutation deleteSubscriber($topicId: String!, $subscriberId: String!) { messagingDeleteSubscriber(topicId: $topicId, subscriberId: $subscriberId) { status } }'; - case self::$CREATE_EMAIL: + case self::CREATE_EMAIL: return 'mutation createEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String!, $content: String!, $status: String, $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { messagingCreateEmail(messageId: $messageId, topics: $topics, users: $users, targets: $targets, subject: $subject, content: $content, status: $status, html: $html, cc: $cc, bcc: $bcc, scheduledAt: $scheduledAt) { _id @@ -2762,7 +2762,7 @@ trait Base status } }'; - case self::$CREATE_SMS: + case self::CREATE_SMS: return 'mutation createSMS($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $content: String!, $status: String, $scheduledAt: String) { messagingCreateSMS(messageId: $messageId, topics: $topics, users: $users, targets: $targets, content: $content, status: $status, scheduledAt: $scheduledAt) { _id @@ -2776,7 +2776,7 @@ trait Base status } }'; - case self::$CREATE_PUSH_NOTIFICATION: + case self::CREATE_PUSH_NOTIFICATION: return 'mutation createPushNotification($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $title: String!, $body: String!, $data: Json, $action: String, $icon: String, $sound: String, $color: String, $tag: String, $badge: String, $status: String, $scheduledAt: String) { messagingCreatePushNotification(messageId: $messageId, topics: $topics, users: $users, targets: $targets, title: $title, body: $body, data: $data, action: $action, icon: $icon, sound: $sound, color: $color, tag: $tag, badge: $badge, status: $status, scheduledAt: $scheduledAt) { _id @@ -2790,7 +2790,7 @@ trait Base status } }'; - case self::$LIST_MESSAGES: + case self::LIST_MESSAGES: return 'query listMessages { messagingListMessages { total @@ -2808,7 +2808,7 @@ trait Base } } }'; - case self::$GET_MESSAGE: + case self::GET_MESSAGE: return 'query getMessage($messageId: String!) { messagingGetMessage(messageId: $messageId) { _id @@ -2823,8 +2823,8 @@ trait Base status } }'; - case self::$UPDATE_EMAIL: - return 'mutation updateEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String, $content: String, $status: String, , $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { + case self::UPDATE_EMAIL: + return 'mutation updateEmail($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $subject: String, $content: String, $status: String, $html: Boolean, $cc: [String], $bcc: [String], $scheduledAt: String) { messagingUpdateEmail(messageId: $messageId, topics: $topics, users: $users, targets: $targets, subject: $subject, content: $content, status: $status, html: $html, cc: $cc, bcc: $bcc, scheduledAt: $scheduledAt) { _id topics @@ -2837,7 +2837,7 @@ trait Base status } }'; - case self::$UPDATE_SMS: + case self::UPDATE_SMS: return 'mutation updateSMS($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $content: String, $status: String, $scheduledAt: String) { messagingUpdateSMS(messageId: $messageId, topics: $topics, users: $users, targets: $targets, content: $content, status: $status, scheduledAt: $scheduledAt) { _id @@ -2851,7 +2851,7 @@ trait Base status } }'; - case self::$UPDATE_PUSH_NOTIFICATION: + case self::UPDATE_PUSH_NOTIFICATION: return 'mutation updatePushNotification($messageId: String!, $topics: [String!], $users: [String!], $targets: [String!], $title: String, $body: String, $data: Json, $action: String, $icon: String, $sound: String, $color: String, $tag: String, $badge: String, $status: String, $scheduledAt: String) { messagingUpdatePushNotification(messageId: $messageId, topics: $topics, users: $users, targets: $targets, title: $title, body: $body, data: $data, action: $action, icon: $icon, sound: $sound, color: $color, tag: $tag, badge: $badge, status: $status, scheduledAt: $scheduledAt) { _id @@ -2865,7 +2865,7 @@ trait Base status } }'; - case self::$COMPLEX_QUERY_COLLECTION: + case self::COMPLEX_QUERY_COLLECTION: return 'mutation complex($databaseId: String!, $databaseName: String!, $collectionId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { databasesCreate(databaseId: $databaseId, name: $databaseName) { _id @@ -3107,14 +3107,14 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$COMPLEX_QUERY_TABLE: + }' . PHP_EOL . self::FRAGMENT_ATTRIBUTES; + case self::COMPLEX_QUERY_TABLE: return 'mutation complex($databaseId: String!, $databaseName: String!, $tableId: String!, $tableName: String!, $rowSecurity: Boolean!, $tablePermissions: [String!]!) { databasesCreate(databaseId: $databaseId, name: $databaseName) { _id name } - gridsCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + tablesDbCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { _id _createdAt _updatedAt @@ -3131,7 +3131,7 @@ trait Base status } } - gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + tablesDbCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { key type status @@ -3140,7 +3140,7 @@ trait Base default array } - gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + tablesDbCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { key type status @@ -3150,7 +3150,7 @@ trait Base default array } - gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + tablesDbCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { key type status @@ -3350,7 +3350,7 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + }' . PHP_EOL . self::FRAGMENT_COLUMNS; } throw new \InvalidArgumentException('Invalid query type'); diff --git a/tests/e2e/Services/GraphQL/ContentTypeTest.php b/tests/e2e/Services/GraphQL/ContentTypeTest.php index 190f1d4fcd..c1320cd47a 100644 --- a/tests/e2e/Services/GraphQL/ContentTypeTest.php +++ b/tests/e2e/Services/GraphQL/ContentTypeTest.php @@ -102,7 +102,7 @@ class ContentTypeTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class ContentTypeTest extends Scope $bucket = $bucket['body']['data']['storageCreateBucket']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, diff --git a/tests/e2e/Services/GraphQL/FunctionsClientTest.php b/tests/e2e/Services/GraphQL/FunctionsClientTest.php index ea2723b803..afb3afb428 100644 --- a/tests/e2e/Services/GraphQL/FunctionsClientTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsClientTest.php @@ -20,7 +20,7 @@ class FunctionsClientTest extends Scope public function testCreateFunction(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FUNCTION); + $query = $this->getQuery(self::CREATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -82,7 +82,7 @@ class FunctionsClientTest extends Scope public function testCreateDeployment($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DEPLOYMENT); + $query = $this->getQuery(self::CREATE_DEPLOYMENT); $gqlPayload = [ 'operations' => \json_encode([ @@ -112,7 +112,7 @@ class FunctionsClientTest extends Scope $deployment = $deployment['body']['data']['functionsCreateDeployment']; $deploymentId = $deployment['_id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -149,7 +149,7 @@ class FunctionsClientTest extends Scope public function testCreateExecution($function, $deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EXECUTION); + $query = $this->getQuery(self::CREATE_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -176,7 +176,7 @@ class FunctionsClientTest extends Scope public function testGetExecutions($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTIONS); + $query = $this->getQuery(self::GET_EXECUTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -208,7 +208,7 @@ class FunctionsClientTest extends Scope public function testGetExecution($function, $execution): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTION); + $query = $this->getQuery(self::GET_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/FunctionsServerTest.php b/tests/e2e/Services/GraphQL/FunctionsServerTest.php index de419ebf0e..ed439f457f 100644 --- a/tests/e2e/Services/GraphQL/FunctionsServerTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsServerTest.php @@ -20,7 +20,7 @@ class FunctionsServerTest extends Scope public function testCreateFunction(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FUNCTION); + $query = $this->getQuery(self::CREATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -81,7 +81,7 @@ class FunctionsServerTest extends Scope public function testCreateDeployment($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DEPLOYMENT); + $query = $this->getQuery(self::CREATE_DEPLOYMENT); $gqlPayload = [ 'operations' => \json_encode([ @@ -110,7 +110,7 @@ class FunctionsServerTest extends Scope $deployment = $deployment['body']['data']['functionsCreateDeployment']; $deploymentId = $deployment['_id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -143,7 +143,7 @@ class FunctionsServerTest extends Scope public function testCreateExecution($deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EXECUTION); + $query = $this->getQuery(self::CREATE_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -171,7 +171,7 @@ class FunctionsServerTest extends Scope public function testCreateRetryBuild($deployment): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$RETRY_BUILD); + $query = $this->getQuery(self::RETRY_BUILD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -193,7 +193,7 @@ class FunctionsServerTest extends Scope public function testGetFunctions(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTIONS); + $query = $this->getQuery(self::GET_FUNCTIONS); $gqlPayload = [ 'query' => $query, ]; @@ -220,7 +220,7 @@ class FunctionsServerTest extends Scope public function testGetFunction($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTION); + $query = $this->getQuery(self::GET_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -244,7 +244,7 @@ class FunctionsServerTest extends Scope public function testGetRuntimes(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_RUNTIMES); + $query = $this->getQuery(self::GET_RUNTIMES); $gqlPayload = [ 'query' => $query, ]; @@ -271,7 +271,7 @@ class FunctionsServerTest extends Scope public function testGetDeployments($function) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DEPLOYMENTS); + $query = $this->getQuery(self::GET_DEPLOYMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -301,7 +301,7 @@ class FunctionsServerTest extends Scope public function testGetDeployment($deployment) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DEPLOYMENT); + $query = $this->getQuery(self::GET_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -332,7 +332,7 @@ class FunctionsServerTest extends Scope public function testGetExecutions($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTIONS); + $query = $this->getQuery(self::GET_EXECUTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -362,7 +362,7 @@ class FunctionsServerTest extends Scope public function testGetExecution($execution): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_EXECUTION); + $query = $this->getQuery(self::GET_EXECUTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -393,7 +393,7 @@ class FunctionsServerTest extends Scope public function testUpdateFunction($function): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FUNCTION); + $query = $this->getQuery(self::UPDATE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -430,7 +430,7 @@ class FunctionsServerTest extends Scope public function testDeleteDeployment($deployment): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DEPLOYMENT); + $query = $this->getQuery(self::DELETE_DEPLOYMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -458,7 +458,7 @@ class FunctionsServerTest extends Scope public function testDeleteFunction($deployment): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FUNCTION); + $query = $this->getQuery(self::DELETE_FUNCTION); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/HealthTest.php b/tests/e2e/Services/GraphQL/HealthTest.php index 76153a751c..484883f668 100644 --- a/tests/e2e/Services/GraphQL/HealthTest.php +++ b/tests/e2e/Services/GraphQL/HealthTest.php @@ -16,7 +16,7 @@ class HealthTest extends Scope public function testGetHTTPHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_HTTP_HEALTH); + $query = $this->getQuery(self::GET_HTTP_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -37,7 +37,7 @@ class HealthTest extends Scope public function testGetDBHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DB_HEALTH); + $query = $this->getQuery(self::GET_DB_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -58,7 +58,7 @@ class HealthTest extends Scope public function testGetCacheHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CACHE_HEALTH); + $query = $this->getQuery(self::GET_CACHE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -79,7 +79,7 @@ class HealthTest extends Scope public function testGetTimeHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TIME_HEALTH); + $query = $this->getQuery(self::GET_TIME_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -100,7 +100,7 @@ class HealthTest extends Scope public function testGetWebhooksQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_WEBHOOKS_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_WEBHOOKS_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -121,7 +121,7 @@ class HealthTest extends Scope public function testGetLogsQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_LOGS_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_LOGS_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -142,7 +142,7 @@ class HealthTest extends Scope public function testGetCertificatesQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_CERTIFICATES_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_CERTIFICATES_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -163,7 +163,7 @@ class HealthTest extends Scope public function testGetFunctionsQueueHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FUNCTION_QUEUE_HEALTH); + $query = $this->getQuery(self::GET_FUNCTION_QUEUE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -184,7 +184,7 @@ class HealthTest extends Scope public function testGetLocalStorageHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_LOCAL_STORAGE_HEALTH); + $query = $this->getQuery(self::GET_LOCAL_STORAGE_HEALTH); $graphQLPayload = [ 'query' => $query, ]; @@ -205,7 +205,7 @@ class HealthTest extends Scope public function testGetAntiVirusHealth() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ANITVIRUS_HEALTH); + $query = $this->getQuery(self::GET_ANITVIRUS_HEALTH); $graphQLPayload = [ 'query' => $query, ]; diff --git a/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php index d579ddb128..a5dc2ec685 100644 --- a/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php @@ -33,7 +33,7 @@ class AbuseTest extends Scope $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY_COLLECTION); + $query = $this->getQuery(self::COMPLEX_QUERY_COLLECTION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -103,7 +103,7 @@ class AbuseTest extends Scope $query = []; for ($i = 0; $i <= $maxQueries + 1; $i++) { - $query[] = ['query' => $this->getQuery(self::$LIST_COUNTRIES)]; + $query[] = ['query' => $this->getQuery(self::LIST_COUNTRIES)]; } $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ @@ -117,7 +117,7 @@ class AbuseTest extends Scope private function createCollection(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -134,7 +134,7 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -157,7 +157,7 @@ class AbuseTest extends Scope $collectionId = $response['body']['data']['databasesCreateCollection']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/AuthTest.php b/tests/e2e/Services/GraphQL/Legacy/AuthTest.php index 0560a0ad2d..560f0693ea 100644 --- a/tests/e2e/Services/GraphQL/Legacy/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/AuthTest.php @@ -31,7 +31,7 @@ class AuthTest extends Scope parent::setUp(); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email1 = 'test' . \rand() . '@test.com'; $email2 = 'test' . \rand() . '@test.com'; @@ -61,7 +61,7 @@ class AuthTest extends Scope ], $graphQLPayload); // Create session 1 - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -87,7 +87,7 @@ class AuthTest extends Scope $this->token2 = $session2['cookies']['a_session_' . $projectId]; // Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -102,7 +102,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -123,7 +123,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -148,7 +148,7 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -173,7 +173,7 @@ class AuthTest extends Scope ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -207,7 +207,7 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -232,7 +232,7 @@ class AuthTest extends Scope ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php index c2c63e41c0..192cc8203c 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php @@ -20,7 +20,7 @@ class DatabaseClientTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -49,7 +49,7 @@ class DatabaseClientTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -89,7 +89,7 @@ class DatabaseClientTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -120,7 +120,7 @@ class DatabaseClientTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -155,7 +155,7 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -199,7 +199,7 @@ class DatabaseClientTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -225,7 +225,7 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -252,7 +252,7 @@ class DatabaseClientTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -285,7 +285,7 @@ class DatabaseClientTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -318,7 +318,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -331,7 +331,7 @@ class DatabaseClientTest extends Scope $databaseId = $res['body']['data']['databasesCreate']['_id']; // Step 2: Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -349,7 +349,7 @@ class DatabaseClientTest extends Scope $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; // Step 3: Create attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -363,7 +363,7 @@ class DatabaseClientTest extends Scope sleep(1); // Step 4: Create documents - $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $query = $this->getQuery(self::CREATE_DOCUMENTS); $documents = []; for ($i = 1; $i <= 10; $i++) { $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; @@ -404,7 +404,7 @@ class DatabaseClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ]; - $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $query = $this->getQuery(self::UPDATE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -435,7 +435,7 @@ class DatabaseClientTest extends Scope ]; // Upsert: Update one, insert one - $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $query = $this->getQuery(self::UPSERT_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -465,7 +465,7 @@ class DatabaseClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ]; - $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $query = $this->getQuery(self::DELETE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php index 3ecc96eaa0..799746ccc7 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php @@ -22,7 +22,7 @@ class DatabaseServerTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -50,7 +50,7 @@ class DatabaseServerTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -117,7 +117,7 @@ class DatabaseServerTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -152,7 +152,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -185,7 +185,7 @@ class DatabaseServerTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -220,7 +220,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -257,7 +257,7 @@ class DatabaseServerTest extends Scope public function testCreateBooleanAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_BOOLEAN_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -290,7 +290,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_BOOLEAN_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -323,7 +323,7 @@ class DatabaseServerTest extends Scope public function testCreateFloatAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_FLOAT_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -359,7 +359,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_FLOAT_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -396,7 +396,7 @@ class DatabaseServerTest extends Scope public function testCreateEmailAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_EMAIL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -429,7 +429,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_EMAIL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -462,7 +462,7 @@ class DatabaseServerTest extends Scope public function testCreateEnumAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_ENUM_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -501,7 +501,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_ENUM_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -541,7 +541,7 @@ class DatabaseServerTest extends Scope public function testCreateDatetimeAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_DATETIME_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -574,7 +574,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_DATETIME_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -606,7 +606,7 @@ class DatabaseServerTest extends Scope public function testCreateRelationshipAttribute(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_RELATIONSHIP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -640,7 +640,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_RELATIONSHIP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -670,7 +670,7 @@ class DatabaseServerTest extends Scope public function testCreateIPAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_IP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -704,7 +704,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_IP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -737,7 +737,7 @@ class DatabaseServerTest extends Scope public function testCreateURLAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_URL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -771,7 +771,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::UPDATE_URL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -803,7 +803,7 @@ class DatabaseServerTest extends Scope public function testCreateIndex($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INDEX); + $query = $this->getQuery(self::CREATE_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -844,7 +844,7 @@ class DatabaseServerTest extends Scope public function testCreateDocument($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -899,7 +899,7 @@ class DatabaseServerTest extends Scope // public function testCreateCustomEntity(): array // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$CREATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::CREATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -929,7 +929,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASES); + $query = $this->getQuery(self::GET_DATABASES); $gqlPayload = [ 'query' => $query, ]; @@ -951,7 +951,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASE); + $query = $this->getQuery(self::GET_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -976,7 +976,7 @@ class DatabaseServerTest extends Scope public function testGetCollections($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTIONS); + $query = $this->getQuery(self::GET_COLLECTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1001,7 +1001,7 @@ class DatabaseServerTest extends Scope public function testGetCollection($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTION); + $query = $this->getQuery(self::GET_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1028,7 +1028,7 @@ class DatabaseServerTest extends Scope public function testGetAttributes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTES); + $query = $this->getQuery(self::GET_ATTRIBUTES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1054,7 +1054,7 @@ class DatabaseServerTest extends Scope public function testGetAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTE); + $query = $this->getQuery(self::GET_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1081,7 +1081,7 @@ class DatabaseServerTest extends Scope public function testGetIndexes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_INDEXES); + $query = $this->getQuery(self::GET_INDEXES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1107,7 +1107,7 @@ class DatabaseServerTest extends Scope public function testGetIndex($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_INDEX); + $query = $this->getQuery(self::GET_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1134,7 +1134,7 @@ class DatabaseServerTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1160,7 +1160,7 @@ class DatabaseServerTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1187,7 +1187,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntities($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITIES); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITIES); // $gqlPayload = [ // 'query' => $query, // ]; @@ -1209,7 +1209,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntity($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITY); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1234,7 +1234,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATABASE); + $query = $this->getQuery(self::UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1260,7 +1260,7 @@ class DatabaseServerTest extends Scope public function testUpdateCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_COLLECTION); + $query = $this->getQuery(self::UPDATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1288,7 +1288,7 @@ class DatabaseServerTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1320,7 +1320,7 @@ class DatabaseServerTest extends Scope // public function testUpdateCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::UPDATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1348,7 +1348,7 @@ class DatabaseServerTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1374,7 +1374,7 @@ class DatabaseServerTest extends Scope // public function testDeleteCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::DELETE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1398,7 +1398,7 @@ class DatabaseServerTest extends Scope public function testDeleteAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ATTRIBUTE); + $query = $this->getQuery(self::DELETE_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1424,7 +1424,7 @@ class DatabaseServerTest extends Scope public function testDeleteCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLLECTION); + $query = $this->getQuery(self::DELETE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1449,7 +1449,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DATABASE); + $query = $this->getQuery(self::DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1479,7 +1479,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1492,7 +1492,7 @@ class DatabaseServerTest extends Scope $databaseId = $res['body']['data']['databasesCreate']['_id']; // Step 2: Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::CREATE_COLLECTION); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1510,7 +1510,7 @@ class DatabaseServerTest extends Scope $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; // Step 3: Create attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::CREATE_STRING_ATTRIBUTE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1524,7 +1524,7 @@ class DatabaseServerTest extends Scope sleep(1); // Step 4: Create documents - $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $query = $this->getQuery(self::CREATE_DOCUMENTS); $documents = []; for ($i = 1; $i <= 10; $i++) { $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; @@ -1564,7 +1564,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $data['projectId'], ], $this->getHeaders()); - $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $query = $this->getQuery(self::UPDATE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -1594,7 +1594,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Upsert: Update one, insert one - $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $query = $this->getQuery(self::UPSERT_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ @@ -1623,7 +1623,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $data['projectId'], ], $this->getHeaders()); - $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $query = $this->getQuery(self::DELETE_DOCUMENTS); $payload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/LocalizationTest.php b/tests/e2e/Services/GraphQL/LocalizationTest.php index 38200911c8..182cdaabae 100644 --- a/tests/e2e/Services/GraphQL/LocalizationTest.php +++ b/tests/e2e/Services/GraphQL/LocalizationTest.php @@ -16,7 +16,7 @@ class LocalizationTest extends Scope public function testGetLocale(): array { $projectId = $this->getProject()['$id']; - $query = \urlencode($this->getQuery(self::$GET_LOCALE)); + $query = \urlencode($this->getQuery(self::GET_LOCALE)); $locale = $this->client->call(Client::METHOD_GET, '/graphql?query=' . $query, \array_merge([ 'content-type' => 'application/json', @@ -34,7 +34,7 @@ class LocalizationTest extends Scope public function testGetCountries(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_COUNTRIES); + $query = $this->getQuery(self::LIST_COUNTRIES); $graphQLPayload = [ 'query' => $query, ]; @@ -56,7 +56,7 @@ class LocalizationTest extends Scope public function testGetCountriesEU(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_EU_COUNTRIES); + $query = $this->getQuery(self::LIST_EU_COUNTRIES); $graphQLPayload = [ 'query' => $query, ]; @@ -78,7 +78,7 @@ class LocalizationTest extends Scope public function testGetCountriesPhones(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_COUNTRY_PHONE_CODES); + $query = $this->getQuery(self::LIST_COUNTRY_PHONE_CODES); $graphQLPayload = [ 'query' => $query, ]; @@ -100,7 +100,7 @@ class LocalizationTest extends Scope public function testGetContinents(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_CONTINENTS); + $query = $this->getQuery(self::LIST_CONTINENTS); $graphQLPayload = [ 'query' => $query, ]; @@ -122,7 +122,7 @@ class LocalizationTest extends Scope public function testGetCurrencies(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_CURRENCIES); + $query = $this->getQuery(self::LIST_CURRENCIES); $graphQLPayload = [ 'query' => $query, ]; @@ -144,7 +144,7 @@ class LocalizationTest extends Scope public function testGetLanguages(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_LANGUAGES); + $query = $this->getQuery(self::LIST_LANGUAGES); $graphQLPayload = [ 'query' => $query, ]; diff --git a/tests/e2e/Services/GraphQL/MessagingTest.php b/tests/e2e/Services/GraphQL/MessagingTest.php index fecb1692a9..4fb3dac84f 100644 --- a/tests/e2e/Services/GraphQL/MessagingTest.php +++ b/tests/e2e/Services/GraphQL/MessagingTest.php @@ -225,7 +225,7 @@ class MessagingTest extends Scope */ public function testListProviders(array $providers) { - $query = $this->getQuery(self::$LIST_PROVIDERS); + $query = $this->getQuery(self::LIST_PROVIDERS); $graphQLPayload = [ 'query' => $query, ]; @@ -243,7 +243,7 @@ class MessagingTest extends Scope */ public function testGetProvider(array $providers) { - $query = $this->getQuery(self::$GET_PROVIDER); + $query = $this->getQuery(self::GET_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -265,7 +265,7 @@ class MessagingTest extends Scope public function testDeleteProvider(array $providers) { foreach ($providers as $provider) { - $query = $this->getQuery(self::$DELETE_PROVIDER); + $query = $this->getQuery(self::DELETE_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -283,7 +283,7 @@ class MessagingTest extends Scope public function testCreateTopic() { - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -309,7 +309,7 @@ class MessagingTest extends Scope public function testUpdateTopic(array $topic) { $topicId = $topic['_id']; - $query = $this->getQuery(self::$UPDATE_TOPIC); + $query = $this->getQuery(self::UPDATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -334,7 +334,7 @@ class MessagingTest extends Scope */ public function testListTopics() { - $query = $this->getQuery(self::$LIST_TOPICS); + $query = $this->getQuery(self::LIST_TOPICS); $graphQLPayload = [ 'query' => $query, ]; @@ -353,7 +353,7 @@ class MessagingTest extends Scope */ public function testGetTopic(string $topicId) { - $query = $this->getQuery(self::$GET_TOPIC); + $query = $this->getQuery(self::GET_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -388,7 +388,7 @@ class MessagingTest extends Scope 'fromEmail' => 'sender-email@my-domain.com', ] ]; - $query = $this->getQuery(self::$CREATE_SENDGRID_PROVIDER); + $query = $this->getQuery(self::CREATE_SENDGRID_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => $providerParam['sendgrid'], @@ -401,7 +401,7 @@ class MessagingTest extends Scope $providerId = $response['body']['data']['messagingCreateSendgridProvider']['_id']; - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -424,7 +424,7 @@ class MessagingTest extends Scope $targetId = $response['body']['data']['usersCreateTarget']['_id']; - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -451,7 +451,7 @@ class MessagingTest extends Scope */ public function testListSubscribers(array $subscriber) { - $query = $this->getQuery(self::$LIST_SUBSCRIBERS); + $query = $this->getQuery(self::LIST_SUBSCRIBERS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -479,7 +479,7 @@ class MessagingTest extends Scope $topicId = $subscriber['topicId']; $subscriberId = $subscriber['_id']; - $query = $this->getQuery(self::$GET_SUBSCRIBER); + $query = $this->getQuery(self::GET_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -509,7 +509,7 @@ class MessagingTest extends Scope $topicId = $subscriber['topicId']; $subscriberId = $subscriber['_id']; - $query = $this->getQuery(self::$DELETE_SUBSCRIBER); + $query = $this->getQuery(self::DELETE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -530,7 +530,7 @@ class MessagingTest extends Scope */ public function testDeleteTopic(string $topicId) { - $query = $this->getQuery(self::$DELETE_TOPIC); + $query = $this->getQuery(self::DELETE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -564,7 +564,7 @@ class MessagingTest extends Scope $this->markTestSkipped('Email provider not configured'); } - $query = $this->getQuery(self::$CREATE_MAILGUN_PROVIDER); + $query = $this->getQuery(self::CREATE_MAILGUN_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -587,7 +587,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateMailgunProvider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -603,7 +603,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -621,7 +621,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -640,7 +640,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -656,7 +656,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_EMAIL); + $query = $this->getQuery(self::CREATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -676,7 +676,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -701,7 +701,7 @@ class MessagingTest extends Scope */ public function testUpdateEmail(array $email) { - $query = $this->getQuery(self::$CREATE_EMAIL); + $query = $this->getQuery(self::CREATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -720,7 +720,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $email['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_EMAIL); + $query = $this->getQuery(self::UPDATE_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -738,7 +738,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -772,7 +772,7 @@ class MessagingTest extends Scope $this->markTestSkipped('SMS provider not configured'); } - $query = $this->getQuery(self::$CREATE_MSG91_PROVIDER); + $query = $this->getQuery(self::CREATE_MSG91_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -793,7 +793,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateMsg91Provider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -809,7 +809,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -827,7 +827,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -846,7 +846,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -862,7 +862,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SMS); + $query = $this->getQuery(self::CREATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -881,7 +881,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -905,7 +905,7 @@ class MessagingTest extends Scope */ public function testUpdateSMS(array $sms) { - $query = $this->getQuery(self::$CREATE_SMS); + $query = $this->getQuery(self::CREATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -923,7 +923,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $sms['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_SMS); + $query = $this->getQuery(self::UPDATE_SMS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -941,7 +941,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -973,7 +973,7 @@ class MessagingTest extends Scope $this->markTestSkipped('Push provider not configured'); } - $query = $this->getQuery(self::$CREATE_FCM_PROVIDER); + $query = $this->getQuery(self::CREATE_FCM_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -997,7 +997,7 @@ class MessagingTest extends Scope $providerId = $provider['body']['data']['messagingCreateFcmProvider']['_id']; - $query = $this->getQuery(self::$CREATE_TOPIC); + $query = $this->getQuery(self::CREATE_TOPIC); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1013,7 +1013,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $topic['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1031,7 +1031,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $user['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1050,7 +1050,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $target['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_SUBSCRIBER); + $query = $this->getQuery(self::CREATE_SUBSCRIBER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1066,7 +1066,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $subscriber['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::CREATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1086,7 +1086,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1111,7 +1111,7 @@ class MessagingTest extends Scope */ public function testUpdatePushNotification(array $push) { - $query = $this->getQuery(self::$CREATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::CREATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1130,7 +1130,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $push['headers']['status-code']); - $query = $this->getQuery(self::$UPDATE_PUSH_NOTIFICATION); + $query = $this->getQuery(self::UPDATE_PUSH_NOTIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -1148,7 +1148,7 @@ class MessagingTest extends Scope \sleep(5); - $query = $this->getQuery(self::$GET_MESSAGE); + $query = $this->getQuery(self::GET_MESSAGE); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/ScopeTest.php b/tests/e2e/Services/GraphQL/ScopeTest.php index a270d6e660..e5b3385030 100644 --- a/tests/e2e/Services/GraphQL/ScopeTest.php +++ b/tests/e2e/Services/GraphQL/ScopeTest.php @@ -18,7 +18,7 @@ class ScopeTest extends Scope { $projectId = $this->getProject()['$id']; $apiKey = $this->getNewKey(['databases.read']); - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -42,7 +42,7 @@ class ScopeTest extends Scope { $projectId = $this->getProject()['$id']; $apiKey = $this->getNewKey(['databases.read', 'databases.write']); - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/StorageClientTest.php b/tests/e2e/Services/GraphQL/StorageClientTest.php index 9896598c2d..e05a394d6f 100644 --- a/tests/e2e/Services/GraphQL/StorageClientTest.php +++ b/tests/e2e/Services/GraphQL/StorageClientTest.php @@ -20,7 +20,7 @@ class StorageClientTest extends Scope public function testCreateBucket(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -56,7 +56,7 @@ class StorageClientTest extends Scope public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, @@ -98,7 +98,7 @@ class StorageClientTest extends Scope public function testGetFiles($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILES); + $query = $this->getQuery(self::GET_FILES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -130,7 +130,7 @@ class StorageClientTest extends Scope public function testGetFile($bucket, $file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE); + $query = $this->getQuery(self::GET_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -159,7 +159,7 @@ class StorageClientTest extends Scope public function testGetFilePreview($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_PREVIEW); + $query = $this->getQuery(self::GET_FILE_PREVIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -189,7 +189,7 @@ class StorageClientTest extends Scope public function testGetFileDownload($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_DOWNLOAD); + $query = $this->getQuery(self::GET_FILE_DOWNLOAD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -215,7 +215,7 @@ class StorageClientTest extends Scope public function testGetFileView($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_VIEW); + $query = $this->getQuery(self::GET_FILE_VIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -241,7 +241,7 @@ class StorageClientTest extends Scope public function testUpdateFile($file): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FILE); + $query = $this->getQuery(self::UPDATE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -276,7 +276,7 @@ class StorageClientTest extends Scope public function testDeleteFile($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FILE); + $query = $this->getQuery(self::DELETE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/StorageServerTest.php b/tests/e2e/Services/GraphQL/StorageServerTest.php index 7fea895b1c..37dba77ab3 100644 --- a/tests/e2e/Services/GraphQL/StorageServerTest.php +++ b/tests/e2e/Services/GraphQL/StorageServerTest.php @@ -20,7 +20,7 @@ class StorageServerTest extends Scope public function testCreateBucket(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BUCKET); + $query = $this->getQuery(self::CREATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -55,7 +55,7 @@ class StorageServerTest extends Scope public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FILE); + $query = $this->getQuery(self::CREATE_FILE); $gqlPayload = [ 'operations' => \json_encode([ 'query' => $query, @@ -90,7 +90,7 @@ class StorageServerTest extends Scope public function testGetBuckets(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BUCKETS); + $query = $this->getQuery(self::GET_BUCKETS); $gqlPayload = [ 'query' => $query, ]; @@ -117,7 +117,7 @@ class StorageServerTest extends Scope public function testGetBucket($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_BUCKET); + $query = $this->getQuery(self::GET_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -147,7 +147,7 @@ class StorageServerTest extends Scope public function testGetFiles($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILES); + $query = $this->getQuery(self::GET_FILES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -179,7 +179,7 @@ class StorageServerTest extends Scope public function testGetFile($bucket, $file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE); + $query = $this->getQuery(self::GET_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -208,7 +208,7 @@ class StorageServerTest extends Scope public function testGetFilePreview($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_PREVIEW); + $query = $this->getQuery(self::GET_FILE_PREVIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -238,7 +238,7 @@ class StorageServerTest extends Scope public function testGetFileDownload($file) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_DOWNLOAD); + $query = $this->getQuery(self::GET_FILE_DOWNLOAD); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -264,7 +264,7 @@ class StorageServerTest extends Scope public function testGetFileView($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_FILE_VIEW); + $query = $this->getQuery(self::GET_FILE_VIEW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -290,7 +290,7 @@ class StorageServerTest extends Scope public function testUpdateBucket($bucket): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BUCKET); + $query = $this->getQuery(self::UPDATE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -322,7 +322,7 @@ class StorageServerTest extends Scope public function testUpdateFile($file): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FILE); + $query = $this->getQuery(self::UPDATE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -357,7 +357,7 @@ class StorageServerTest extends Scope public function testDeleteFile($file): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_FILE); + $query = $this->getQuery(self::DELETE_FILE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -384,7 +384,7 @@ class StorageServerTest extends Scope public function testDeleteBucket($bucket): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_BUCKET); + $query = $this->getQuery(self::DELETE_BUCKET); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php b/tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php similarity index 91% rename from tests/e2e/Services/GraphQL/Grids/AbuseTest.php rename to tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php index 1a388871bf..4dfbe9ec21 100644 --- a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/AbuseTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY_TABLE); + $query = $this->getQuery(self::COMPLEX_QUERY_TABLE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -103,7 +103,7 @@ class AbuseTest extends Scope $query = []; for ($i = 0; $i <= $maxQueries + 1; $i++) { - $query[] = ['query' => $this->getQuery(self::$LIST_COUNTRIES)]; + $query[] = ['query' => $this->getQuery(self::LIST_COUNTRIES)]; } $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ @@ -117,7 +117,7 @@ class AbuseTest extends Scope private function createTable(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -134,7 +134,7 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -155,9 +155,9 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $tableId = $response['body']['data']['gridsCreateTable']['_id']; + $tableId = $response['body']['data']['tablesDbCreateTable']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Grids/AuthTest.php b/tests/e2e/Services/GraphQL/TablesDB/AuthTest.php similarity index 86% rename from tests/e2e/Services/GraphQL/Grids/AuthTest.php rename to tests/e2e/Services/GraphQL/TablesDB/AuthTest.php index fc6b76818c..7a3794da45 100644 --- a/tests/e2e/Services/GraphQL/Grids/AuthTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/AuthTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ACCOUNT); + $query = $this->getQuery(self::CREATE_ACCOUNT); $email1 = 'test' . \rand() . '@test.com'; $email2 = 'test' . \rand() . '@test.com'; @@ -61,7 +61,7 @@ class AuthTest extends Scope ], $graphQLPayload); // Create session 1 - $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $query = $this->getQuery(self::CREATE_ACCOUNT_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -87,7 +87,7 @@ class AuthTest extends Scope $this->token2 = $session2['cookies']['a_session_' . $projectId]; // Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -102,7 +102,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -123,12 +123,12 @@ class AuthTest extends Scope ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDbCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -148,13 +148,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create row as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDbCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -173,13 +173,13 @@ class AuthTest extends Scope ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], - 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['tablesDbCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesDbCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ @@ -188,7 +188,7 @@ class AuthTest extends Scope 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($row['body']['data']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDbGetRow']); $this->assertArrayNotHasKey('errors', $row['body']); // Try to read as account 2 @@ -207,13 +207,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create row as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesDbCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -232,13 +232,13 @@ class AuthTest extends Scope ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], - 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['tablesDbCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesDbCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php similarity index 87% rename from tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php rename to tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php index 8095692b92..bed9d6f8c1 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -38,7 +38,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($database['body']['data']); $this->assertArrayNotHasKey('errors', $database['body']); - $database = $database['body']['data']['gridsCreateDatabase']; + $database = $database['body']['data']['tablesDbCreate']; $this->assertEquals('Actors', $database['name']); return $database; @@ -50,7 +50,7 @@ class DatabaseClientTest extends Scope public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['gridsCreateTable']; + $table = $table['body']['data']['tablesDbCreateTable']; $this->assertEquals('Actors', $table['name']); return [ @@ -90,7 +90,7 @@ class DatabaseClientTest extends Scope public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -110,7 +110,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateStringColumn']); return $data; } @@ -121,7 +121,7 @@ class DatabaseClientTest extends Scope public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -142,7 +142,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateIntegerColumn']); return $data; } @@ -156,7 +156,7 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -183,7 +183,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsCreateRow']; + $row = $row['body']['data']['tablesDbCreateRow']; $this->assertIsArray($row); return [ @@ -200,7 +200,7 @@ class DatabaseClientTest extends Scope public function testGetRows($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -216,7 +216,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['gridsListRows']); + $this->assertIsArray($rows['body']['data']['tablesDbListRows']); } /** @@ -226,7 +226,7 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -243,7 +243,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDbGetRow']); } /** @@ -253,7 +253,7 @@ class DatabaseClientTest extends Scope public function testUpdateRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -273,7 +273,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsUpdateRow']; + $row = $row['body']['data']['tablesDbUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); @@ -286,7 +286,7 @@ class DatabaseClientTest extends Scope public function testDeleteRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -319,7 +319,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -330,10 +330,10 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; + $databaseId = $res['body']['data']['tablesDbCreate']['_id']; // Step 2: Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -349,10 +349,10 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['gridsCreateTable']['_id']; + $tableId = $res['body']['data']['tablesDbCreateTable']['_id']; // Step 3: Create column - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -367,7 +367,7 @@ class DatabaseClientTest extends Scope sleep(1); // Step 4: Create rows - $query = $this->getQuery(self::$CREATE_ROWS); + $query = $this->getQuery(self::CREATE_ROWS); $rows = []; for ($i = 1; $i <= 10; $i++) { $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; @@ -382,7 +382,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDbCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -406,7 +406,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Bulk update rows - $query = $this->getQuery(self::$UPDATE_ROWS); + $query = $this->getQuery(self::UPDATE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -421,10 +421,10 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDbUpdateRows']['rows']); // Step 2: Fetch and validate updated rows - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -437,7 +437,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['gridsListRows']; + $fetched = $res['body']['data']['tablesDbListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -469,7 +469,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Mutate row 10 and add row 11 - $query = $this->getQuery(self::$UPSERT_ROWS); + $query = $this->getQuery(self::UPSERT_ROWS); $upsertPayload = [ 'query' => $query, 'variables' => [ @@ -490,7 +490,7 @@ class DatabaseClientTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); $this->assertArrayNotHasKey('errors', $response['body']); - $rows = $response['body']['data']['gridsUpsertRows']['rows']; + $rows = $response['body']['data']['tablesDbUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -503,7 +503,7 @@ class DatabaseClientTest extends Scope $this->assertArrayHasKey('Row #11', $rowMap); // Step 2: Fetch all rows and confirm count is now 11 - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $fetchPayload = [ 'query' => $query, 'variables' => [ @@ -515,11 +515,11 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['gridsListRows']; + $fetched = $res['body']['data']['tablesDbListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` - $query = $this->getQuery(self::$UPSERT_ROW); + $query = $this->getQuery(self::UPSERT_ROW); $payload = [ 'query' => $query, 'variables' => [ @@ -534,7 +534,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $updated = $res['body']['data']['gridsUpsertRow']; + $updated = $res['body']['data']['tablesDbUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -554,7 +554,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Perform bulk delete - $query = $this->getQuery(self::$DELETE_ROWS); + $query = $this->getQuery(self::DELETE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -566,12 +566,12 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['gridsDeleteRows']['rows']; + $deleted = $res['body']['data']['tablesDbDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); // Step 2: Confirm deletion via refetch - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -582,7 +582,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); + $this->assertEquals(0, $res['body']['data']['tablesDbListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php similarity index 85% rename from tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php rename to tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php index aadee9749c..dc43771784 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -39,7 +39,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($database['body']['data']); $this->assertArrayNotHasKey('errors', $database['body']); - $database = $database['body']['data']['gridsCreateDatabase']; + $database = $database['body']['data']['tablesDbCreate']; $this->assertEquals('Actors', $database['name']); return $database; @@ -51,7 +51,7 @@ class DatabaseServerTest extends Scope public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['gridsCreateTable']; + $table = $table['body']['data']['tablesDbCreateTable']; $this->assertEquals('Actors', $table['name']); $gqlPayload = [ @@ -101,7 +101,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table2['body']['data']); $this->assertArrayNotHasKey('errors', $table2['body']); - $table2 = $table2['body']['data']['gridsCreateTable']; + $table2 = $table2['body']['data']['tablesDbCreateTable']; $this->assertEquals('Movies', $table2['name']); return [ @@ -118,7 +118,7 @@ class DatabaseServerTest extends Scope public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -138,7 +138,7 @@ class DatabaseServerTest extends Scope // TODO: @itznotabug - check for `encrypt` attribute in string column's response body as well! $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateStringColumn']); return $data; } @@ -153,7 +153,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_COLUMN); + $query = $this->getQuery(self::UPDATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -171,9 +171,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateStringColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateStringColumn']['required']); - $this->assertEquals('Default Value', $column['body']['data']['gridsUpdateStringColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateStringColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $column['body']['data']['tablesDbUpdateStringColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -186,7 +186,7 @@ class DatabaseServerTest extends Scope public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -206,7 +206,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateIntegerColumn']); return $data; } @@ -221,7 +221,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_COLUMN); + $query = $this->getQuery(self::UPDATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -241,11 +241,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateIntegerColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateIntegerColumn']['required']); - $this->assertEquals(12, $column['body']['data']['gridsUpdateIntegerColumn']['min']); - $this->assertEquals(160, $column['body']['data']['gridsUpdateIntegerColumn']['max']); - $this->assertEquals(50, $column['body']['data']['gridsUpdateIntegerColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateIntegerColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateIntegerColumn']['required']); + $this->assertEquals(12, $column['body']['data']['tablesDbUpdateIntegerColumn']['min']); + $this->assertEquals(160, $column['body']['data']['tablesDbUpdateIntegerColumn']['max']); + $this->assertEquals(50, $column['body']['data']['tablesDbUpdateIntegerColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -258,7 +258,7 @@ class DatabaseServerTest extends Scope public function testCreateBooleanColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::CREATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -276,7 +276,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateBooleanColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateBooleanColumn']); return $data; } @@ -291,7 +291,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::UPDATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -309,9 +309,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateBooleanColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateBooleanColumn']['required']); - $this->assertTrue($column['body']['data']['gridsUpdateBooleanColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateBooleanColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateBooleanColumn']['required']); + $this->assertTrue($column['body']['data']['tablesDbUpdateBooleanColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -324,7 +324,7 @@ class DatabaseServerTest extends Scope public function testCreateFloatColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_COLUMN); + $query = $this->getQuery(self::CREATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -345,7 +345,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateFloatColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateFloatColumn']); return $data; } @@ -360,7 +360,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_COLUMN); + $query = $this->getQuery(self::UPDATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -380,11 +380,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateFloatColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateFloatColumn']['required']); - $this->assertEquals(100.0, $column['body']['data']['gridsUpdateFloatColumn']['min']); - $this->assertEquals(1000000.0, $column['body']['data']['gridsUpdateFloatColumn']['max']); - $this->assertEquals(2500.0, $column['body']['data']['gridsUpdateFloatColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateFloatColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateFloatColumn']['required']); + $this->assertEquals(100.0, $column['body']['data']['tablesDbUpdateFloatColumn']['min']); + $this->assertEquals(1000000.0, $column['body']['data']['tablesDbUpdateFloatColumn']['max']); + $this->assertEquals(2500.0, $column['body']['data']['tablesDbUpdateFloatColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -397,7 +397,7 @@ class DatabaseServerTest extends Scope public function testCreateEmailColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_COLUMN); + $query = $this->getQuery(self::CREATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -415,7 +415,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateEmailColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateEmailColumn']); return $data; } @@ -430,7 +430,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_COLUMN); + $query = $this->getQuery(self::UPDATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -448,9 +448,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateEmailColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateEmailColumn']['required']); - $this->assertEquals('torsten@appwrite.io', $column['body']['data']['gridsUpdateEmailColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateEmailColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['tablesDbUpdateEmailColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -463,7 +463,7 @@ class DatabaseServerTest extends Scope public function testCreateEnumColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_COLUMN); + $query = $this->getQuery(self::CREATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -486,7 +486,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateEnumColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateEnumColumn']); return $data; } @@ -502,7 +502,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_COLUMN); + $query = $this->getQuery(self::UPDATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -525,11 +525,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateEnumColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateEnumColumn']['required']); - $this->assertEquals('tech', $column['body']['data']['gridsUpdateEnumColumn']['default']); - $this->assertContains('tech', $column['body']['data']['gridsUpdateEnumColumn']['elements']); - $this->assertNotContains('guest', $column['body']['data']['gridsUpdateEnumColumn']['elements']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateEnumColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateEnumColumn']['required']); + $this->assertEquals('tech', $column['body']['data']['tablesDbUpdateEnumColumn']['default']); + $this->assertContains('tech', $column['body']['data']['tablesDbUpdateEnumColumn']['elements']); + $this->assertNotContains('guest', $column['body']['data']['tablesDbUpdateEnumColumn']['elements']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -542,7 +542,7 @@ class DatabaseServerTest extends Scope public function testCreateDatetimeColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_COLUMN); + $query = $this->getQuery(self::CREATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -560,7 +560,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateDatetimeColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateDatetimeColumn']); return $data; } @@ -575,7 +575,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_COLUMN); + $query = $this->getQuery(self::UPDATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -593,9 +593,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateDatetimeColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateDatetimeColumn']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['gridsUpdateDatetimeColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateDatetimeColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateDatetimeColumn']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['tablesDbUpdateDatetimeColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -607,7 +607,7 @@ class DatabaseServerTest extends Scope public function testCreateRelationshipColumn(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::CREATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -628,7 +628,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateRelationshipColumn']); return $data; } @@ -641,7 +641,7 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::UPDATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -659,7 +659,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateRelationshipColumn']); return $data; } @@ -671,7 +671,7 @@ class DatabaseServerTest extends Scope public function testCreateIPColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_COLUMN); + $query = $this->getQuery(self::CREATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -690,7 +690,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateIpColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateIpColumn']); return $data; } @@ -705,7 +705,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_COLUMN); + $query = $this->getQuery(self::UPDATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -723,9 +723,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateIpColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateIpColumn']['required']); - $this->assertEquals('127.0.0.1', $column['body']['data']['gridsUpdateIpColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateIpColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateIpColumn']['required']); + $this->assertEquals('127.0.0.1', $column['body']['data']['tablesDbUpdateIpColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -738,7 +738,7 @@ class DatabaseServerTest extends Scope public function testCreateURLColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_COLUMN); + $query = $this->getQuery(self::CREATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -757,7 +757,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsCreateUrlColumn']); + $this->assertIsArray($column['body']['data']['tablesDbCreateUrlColumn']); return $data; } @@ -772,7 +772,7 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_COLUMN); + $query = $this->getQuery(self::UPDATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -790,9 +790,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsUpdateUrlColumn']); - $this->assertFalse($column['body']['data']['gridsUpdateUrlColumn']['required']); - $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['gridsUpdateUrlColumn']['default']); + $this->assertIsArray($column['body']['data']['tablesDbUpdateUrlColumn']); + $this->assertFalse($column['body']['data']['tablesDbUpdateUrlColumn']['required']); + $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['tablesDbUpdateUrlColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); } @@ -804,7 +804,7 @@ class DatabaseServerTest extends Scope public function testCreateIndex($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLUMN_INDEX); + $query = $this->getQuery(self::CREATE_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -826,12 +826,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['gridsCreateIndex']); + $this->assertIsArray($index['body']['data']['tablesDbCreateIndex']); return [ 'database' => $data['database'], 'table' => $data['table'], - 'index' => $index['body']['data']['gridsCreateIndex'], + 'index' => $index['body']['data']['tablesDbCreateIndex'], ]; } @@ -845,7 +845,7 @@ class DatabaseServerTest extends Scope public function testCreateRow($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -877,7 +877,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsCreateRow']; + $row = $row['body']['data']['tablesDbCreateRow']; $this->assertIsArray($row); return [ @@ -900,7 +900,7 @@ class DatabaseServerTest extends Scope // public function testCreateCustomEntity(): array // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$CREATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::CREATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -930,7 +930,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_GET_DATABASES); + $query = $this->getQuery(self::TABLESDB_GET_DATABASES); $gqlPayload = [ 'query' => $query, ]; @@ -942,7 +942,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $databases['body']); $this->assertIsArray($databases['body']['data']); - $this->assertIsArray($databases['body']['data']['gridsListDatabases']); + $this->assertIsArray($databases['body']['data']['tablesDbList']); } /** @@ -952,7 +952,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_GET_DATABASE); + $query = $this->getQuery(self::TABLESDB_GET_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -967,7 +967,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['gridsGetDatabase']); + $this->assertIsArray($database['body']['data']['tablesDbGet']); } /** @@ -977,7 +977,7 @@ class DatabaseServerTest extends Scope public function testGetTables($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLES); + $query = $this->getQuery(self::GET_TABLES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -994,7 +994,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['gridsListTables']); + $this->assertIsArray($tables['body']['data']['tablesDbListTables']); } /** @@ -1004,7 +1004,7 @@ class DatabaseServerTest extends Scope public function testGetTable($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLE); + $query = $this->getQuery(self::GET_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1020,7 +1020,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['gridsGetTable']); + $this->assertIsArray($table['body']['data']['tablesDbGetTable']); } /** @@ -1031,7 +1031,7 @@ class DatabaseServerTest extends Scope public function testGetColumns($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMNS); + $query = $this->getQuery(self::GET_COLUMNS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1047,7 +1047,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $columns['body']); $this->assertIsArray($columns['body']['data']); - $this->assertIsArray($columns['body']['data']['gridsListColumns']); + $this->assertIsArray($columns['body']['data']['tablesDbListColumns']); } /** @@ -1057,7 +1057,7 @@ class DatabaseServerTest extends Scope public function testGetColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN); + $query = $this->getQuery(self::GET_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1074,7 +1074,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['gridsGetColumn']); + $this->assertIsArray($column['body']['data']['tablesDbGetColumn']); } /** @@ -1084,7 +1084,7 @@ class DatabaseServerTest extends Scope public function testGetIndexes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN_INDEXES); + $query = $this->getQuery(self::GET_COLUMN_INDEXES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1100,7 +1100,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['gridsListIndexes']); + $this->assertIsArray($indices['body']['data']['tablesDbListIndexes']); } /** @@ -1110,7 +1110,7 @@ class DatabaseServerTest extends Scope public function testGetIndex($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN_INDEX); + $query = $this->getQuery(self::GET_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1127,7 +1127,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['gridsGetIndex']); + $this->assertIsArray($index['body']['data']['tablesDbGetIndex']); } /** @@ -1137,7 +1137,7 @@ class DatabaseServerTest extends Scope public function testGetRows($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1153,7 +1153,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['gridsListRows']); + $this->assertIsArray($rows['body']['data']['tablesDbListRows']); } /** @@ -1163,7 +1163,7 @@ class DatabaseServerTest extends Scope public function testGetRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1180,7 +1180,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['gridsGetRow']); + $this->assertIsArray($row['body']['data']['tablesDbGetRow']); } // /** @@ -1190,7 +1190,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntities($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITIES); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITIES); // $gqlPayload = [ // 'query' => $query, // ]; @@ -1212,7 +1212,7 @@ class DatabaseServerTest extends Scope // public function testGetCustomEntity($data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$GET_CUSTOM_ENTITY); + // $query = $this->getQuery(self::GET_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1237,7 +1237,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_UPDATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1253,7 +1253,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['gridsUpdateDatabase']); + $this->assertIsArray($database['body']['data']['tablesDbUpdate']); } /** @@ -1263,7 +1263,7 @@ class DatabaseServerTest extends Scope public function testUpdateTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TABLE); + $query = $this->getQuery(self::UPDATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1281,7 +1281,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['gridsUpdateTable']); + $this->assertIsArray($table['body']['data']['tablesDbUpdateTable']); } /** @@ -1291,7 +1291,7 @@ class DatabaseServerTest extends Scope public function testUpdateRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1311,7 +1311,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['gridsUpdateRow']; + $row = $row['body']['data']['tablesDbUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); } @@ -1323,7 +1323,7 @@ class DatabaseServerTest extends Scope // public function testUpdateCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::UPDATE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1351,7 +1351,7 @@ class DatabaseServerTest extends Scope public function testDeleteRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1377,7 +1377,7 @@ class DatabaseServerTest extends Scope // public function testDeleteCustomEntity(array $data) // { // $projectId = $this->getProject()['$id']; - // $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY); + // $query = $this->getQuery(self::DELETE_CUSTOM_ENTITY); // $gqlPayload = [ // 'query' => $query, // 'variables' => [ @@ -1401,7 +1401,7 @@ class DatabaseServerTest extends Scope public function testDeleteColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLUMN); + $query = $this->getQuery(self::DELETE_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1427,7 +1427,7 @@ class DatabaseServerTest extends Scope public function testDeleteTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TABLE); + $query = $this->getQuery(self::DELETE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1452,7 +1452,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GRIDS_DELETE_DATABASE); + $query = $this->getQuery(self::TABLESDB_DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1482,7 +1482,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); + $query = $this->getQuery(self::TABLESDB_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1493,10 +1493,10 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; + $databaseId = $res['body']['data']['tablesDbCreate']['_id']; // Step 2: Create table - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::CREATE_TABLE); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1512,10 +1512,10 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['gridsCreateTable']['_id']; + $tableId = $res['body']['data']['tablesDbCreateTable']['_id']; // Step 3: Create column - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::CREATE_STRING_COLUMN); $payload['query'] = $query; $payload['variables'] = [ 'databaseId' => $databaseId, @@ -1530,7 +1530,7 @@ class DatabaseServerTest extends Scope sleep(1); // Step 4: Create rows - $query = $this->getQuery(self::$CREATE_ROWS); + $query = $this->getQuery(self::CREATE_ROWS); $rows = []; for ($i = 1; $i <= 10; $i++) { $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; @@ -1545,7 +1545,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDbCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -1568,7 +1568,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Bulk update rows - $query = $this->getQuery(self::$UPDATE_ROWS); + $query = $this->getQuery(self::UPDATE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1583,10 +1583,10 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['tablesDbUpdateRows']['rows']); // Step 2: Fetch and validate updated rows - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1599,7 +1599,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['gridsListRows']; + $fetched = $res['body']['data']['tablesDbListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -1630,7 +1630,7 @@ class DatabaseServerTest extends Scope ]; // Step 1: Mutate row 10 and add row 11 - $query = $this->getQuery(self::$UPSERT_ROWS); + $query = $this->getQuery(self::UPSERT_ROWS); $upsertPayload = [ 'query' => $query, 'variables' => [ @@ -1651,7 +1651,7 @@ class DatabaseServerTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); $this->assertArrayNotHasKey('errors', $response['body']); - $rows = $response['body']['data']['gridsUpsertRows']['rows']; + $rows = $response['body']['data']['tablesDbUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -1664,7 +1664,7 @@ class DatabaseServerTest extends Scope $this->assertArrayHasKey('Row #11', $rowMap); // Step 2: Fetch all rows and confirm count is now 11 - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $fetchPayload = [ 'query' => $query, 'variables' => [ @@ -1676,11 +1676,11 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['gridsListRows']; + $fetched = $res['body']['data']['tablesDbListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` - $query = $this->getQuery(self::$UPSERT_ROW); + $query = $this->getQuery(self::UPSERT_ROW); $payload = [ 'query' => $query, 'variables' => [ @@ -1695,7 +1695,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $updated = $res['body']['data']['gridsUpsertRow']; + $updated = $res['body']['data']['tablesDbUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -1714,7 +1714,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Perform bulk delete - $query = $this->getQuery(self::$DELETE_ROWS); + $query = $this->getQuery(self::DELETE_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1726,12 +1726,12 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['gridsDeleteRows']['rows']; + $deleted = $res['body']['data']['tablesDbDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); // Step 2: Confirm deletion via refetch - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::GET_ROWS); $payload = [ 'query' => $query, 'variables' => [ @@ -1742,7 +1742,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); + $this->assertEquals(0, $res['body']['data']['tablesDbListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/TeamsClientTest.php b/tests/e2e/Services/GraphQL/TeamsClientTest.php index 87dbfcca00..d077d3c87b 100644 --- a/tests/e2e/Services/GraphQL/TeamsClientTest.php +++ b/tests/e2e/Services/GraphQL/TeamsClientTest.php @@ -17,7 +17,7 @@ class TeamsClientTest extends Scope public function testCreateTeam(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM); + $query = $this->getQuery(self::CREATE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -46,7 +46,7 @@ class TeamsClientTest extends Scope public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::CREATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -75,7 +75,7 @@ class TeamsClientTest extends Scope public function testGetTeams() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAMS); + $query = $this->getQuery(self::GET_TEAMS); $graphQLPayload = [ 'query' => $query, ]; @@ -95,7 +95,7 @@ class TeamsClientTest extends Scope public function testGetTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM); + $query = $this->getQuery(self::GET_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -120,7 +120,7 @@ class TeamsClientTest extends Scope public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIPS); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -145,7 +145,7 @@ class TeamsClientTest extends Scope public function testGetTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -170,7 +170,7 @@ class TeamsClientTest extends Scope public function testDeleteTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::DELETE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/TeamsServerTest.php b/tests/e2e/Services/GraphQL/TeamsServerTest.php index d773dcef5d..d99ae99cf0 100644 --- a/tests/e2e/Services/GraphQL/TeamsServerTest.php +++ b/tests/e2e/Services/GraphQL/TeamsServerTest.php @@ -17,7 +17,7 @@ class TeamsServerTest extends Scope public function testCreateTeam(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM); + $query = $this->getQuery(self::CREATE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -46,7 +46,7 @@ class TeamsServerTest extends Scope public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::CREATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -74,7 +74,7 @@ class TeamsServerTest extends Scope public function testGetTeams() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAMS); + $query = $this->getQuery(self::GET_TEAMS); $graphQLPayload = [ 'query' => $query, ]; @@ -94,7 +94,7 @@ class TeamsServerTest extends Scope public function testGetTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM); + $query = $this->getQuery(self::GET_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -121,7 +121,7 @@ class TeamsServerTest extends Scope public function testUpdateTeamPrefs($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_PREFERENCES); + $query = $this->getQuery(self::UPDATE_TEAM_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -151,7 +151,7 @@ class TeamsServerTest extends Scope public function testGetTeamPreferences($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_PREFERENCES); + $query = $this->getQuery(self::GET_TEAM_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -175,7 +175,7 @@ class TeamsServerTest extends Scope public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIPS); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -200,7 +200,7 @@ class TeamsServerTest extends Scope public function testGetTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::GET_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -224,7 +224,7 @@ class TeamsServerTest extends Scope public function testUpdateTeam($team) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_NAME); + $query = $this->getQuery(self::UPDATE_TEAM_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -251,7 +251,7 @@ class TeamsServerTest extends Scope public function testUpdateTeamMembershipRoles($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::UPDATE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -279,7 +279,7 @@ class TeamsServerTest extends Scope public function testDeleteTeamMembership($team, $membership) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM_MEMBERSHIP); + $query = $this->getQuery(self::DELETE_TEAM_MEMBERSHIP); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -303,7 +303,7 @@ class TeamsServerTest extends Scope $team = $this->testCreateTeam(); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TEAM); + $query = $this->getQuery(self::DELETE_TEAM); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/UsersTest.php b/tests/e2e/Services/GraphQL/UsersTest.php index 64d690a0fc..7093c354a0 100644 --- a/tests/e2e/Services/GraphQL/UsersTest.php +++ b/tests/e2e/Services/GraphQL/UsersTest.php @@ -18,7 +18,7 @@ class UsersTest extends Scope public function testCreateUser(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_USER); + $query = $this->getQuery(self::CREATE_USER); $email = 'users.service@example.com'; $graphQLPayload = [ 'query' => $query, @@ -52,7 +52,7 @@ class UsersTest extends Scope { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_MAILGUN_PROVIDER); + $query = $this->getQuery(self::CREATE_MAILGUN_PROVIDER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -73,7 +73,7 @@ class UsersTest extends Scope $this->assertEquals(200, $provider['headers']['status-code']); - $query = $this->getQuery(self::$CREATE_USER_TARGET); + $query = $this->getQuery(self::CREATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -99,7 +99,7 @@ class UsersTest extends Scope public function testGetUsers() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USERS); + $query = $this->getQuery(self::GET_USERS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -124,7 +124,7 @@ class UsersTest extends Scope public function testGetUser() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER); + $query = $this->getQuery(self::GET_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -146,7 +146,7 @@ class UsersTest extends Scope public function testGetUserPreferences() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_PREFERENCES); + $query = $this->getQuery(self::GET_USER_PREFERENCES); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -167,7 +167,7 @@ class UsersTest extends Scope public function testGetUserSessions() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_SESSIONS); + $query = $this->getQuery(self::GET_USER_SESSIONS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -188,7 +188,7 @@ class UsersTest extends Scope public function testGetUserMemberships() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_MEMBERSHIPS); + $query = $this->getQuery(self::GET_USER_MEMBERSHIPS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -209,7 +209,7 @@ class UsersTest extends Scope public function testGetUserLogs() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_LOGS); + $query = $this->getQuery(self::GET_USER_LOGS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -233,7 +233,7 @@ class UsersTest extends Scope public function testListUserTargets(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$LIST_USER_TARGETS); + $query = $this->getQuery(self::LIST_USER_TARGETS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -257,7 +257,7 @@ class UsersTest extends Scope public function testGetUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_USER_TARGET); + $query = $this->getQuery(self::GET_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -278,7 +278,7 @@ class UsersTest extends Scope public function testUpdateUserStatus() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_STATUS); + $query = $this->getQuery(self::UPDATE_USER_STATUS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -301,7 +301,7 @@ class UsersTest extends Scope public function testUpdateUserEmailVerification() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_EMAIL_VERIFICATION); + $query = $this->getQuery(self::UPDATE_USER_EMAIL_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -323,7 +323,7 @@ class UsersTest extends Scope public function testUpdateUserPhoneVerification() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PHONE_VERIFICATION); + $query = $this->getQuery(self::UPDATE_USER_PHONE_VERIFICATION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -346,7 +346,7 @@ class UsersTest extends Scope public function testUpdateUserName() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_NAME); + $query = $this->getQuery(self::UPDATE_USER_NAME); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -369,7 +369,7 @@ class UsersTest extends Scope public function testUpdateUserEmail() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_EMAIL); + $query = $this->getQuery(self::UPDATE_USER_EMAIL); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -392,7 +392,7 @@ class UsersTest extends Scope public function testUpdateUserPassword() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PASSWORD); + $query = $this->getQuery(self::UPDATE_USER_PASSWORD); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -414,7 +414,7 @@ class UsersTest extends Scope public function testUpdateUserPhone() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PHONE); + $query = $this->getQuery(self::UPDATE_USER_PHONE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -437,7 +437,7 @@ class UsersTest extends Scope public function testUpdateUserPrefs() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_PREFS); + $query = $this->getQuery(self::UPDATE_USER_PREFS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -465,7 +465,7 @@ class UsersTest extends Scope public function testUpdateUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_USER_TARGET); + $query = $this->getQuery(self::UPDATE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -487,7 +487,7 @@ class UsersTest extends Scope public function testDeleteUserSessions() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_SESSIONS); + $query = $this->getQuery(self::DELETE_USER_SESSIONS); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -510,7 +510,7 @@ class UsersTest extends Scope public function testDeleteUserSession() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_SESSION); + $query = $this->getQuery(self::DELETE_USER_SESSION); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -537,7 +537,7 @@ class UsersTest extends Scope public function testDeleteUserTarget(array $target) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER_TARGET); + $query = $this->getQuery(self::DELETE_USER_TARGET); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -557,7 +557,7 @@ class UsersTest extends Scope public function testDeleteUser() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_USER); + $query = $this->getQuery(self::DELETE_USER); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 3166688db1..7a57b7f8f9 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -439,7 +439,7 @@ trait MigrationsBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', [ + $table = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -453,7 +453,7 @@ trait MigrationsBase $tableId = $table['body']['$id']; // Create Column - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -468,7 +468,7 @@ trait MigrationsBase // Wait for column to be ready $this->assertEventually(function () use ($databaseId, $tableId) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -501,7 +501,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -513,7 +513,7 @@ trait MigrationsBase $this->assertEquals($tableId, $response['body']['$id']); $this->assertEquals('Test Table', $response['body']['name']); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -547,7 +547,7 @@ trait MigrationsBase $table = $data['tableId']; $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $table . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -597,7 +597,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows/' . $rowId, [ + $response = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $table . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -919,7 +919,7 @@ trait MigrationsBase $databaseId = $response['body']['$id']; // make a table - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -934,7 +934,7 @@ trait MigrationsBase $tableId = $response['body']['$id']; // make columns - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -950,7 +950,7 @@ trait MigrationsBase $this->assertEquals($response['body']['size'], 256); $this->assertEquals($response['body']['required'], true); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1144,7 +1144,7 @@ trait MigrationsBase }, 10_000, 500); // get rows count - $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/grids/tables/'.$tableId.'/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/tablesdb/'.$databaseId.'/tables/'.$tableId.'/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index a318eb82ba..c2834a0228 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -272,7 +272,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Attributes */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -288,7 +288,7 @@ class RealtimeConsoleClientTest extends Scope $actorsId = $actors['body']['$id']; - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -462,7 +462,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Indexes */ - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -629,7 +629,7 @@ class RealtimeConsoleClientTest extends Scope * Test Delete Index */ $indexKey = 'key_name'; - $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -783,7 +783,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Delete Attribute */ - $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 35cf003586..41f6c03c35 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -409,7 +409,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -460,7 +460,7 @@ trait WebhooksBase $actorsId = $data['actorsId']; $databaseId = $data['databaseId']; - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -470,7 +470,7 @@ trait WebhooksBase 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -480,7 +480,7 @@ trait WebhooksBase 'required' => true, ]); - $extra = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ + $extra = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -518,7 +518,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['key']); $this->assertEquals($webhook['data']['key'], 'extra'); - $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ + $removed = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -558,7 +558,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -621,7 +621,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -682,7 +682,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -704,7 +704,7 @@ trait WebhooksBase $this->assertEquals($row['headers']['status-code'], 201); $this->assertNotEmpty($row['body']['$id']); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 1d9b9061d9..1df6dfe9ae 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -218,7 +218,7 @@ class WebhooksCustomServerTest extends Scope /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $id, array_merge([ + $actors = $this->client->call(Client::METHOD_PUT, '/tablesdb/' . $databaseId . '/tables/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -260,7 +260,7 @@ class WebhooksCustomServerTest extends Scope $actorsId = $data['actorsId']; $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -295,7 +295,7 @@ class WebhooksCustomServerTest extends Scope $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); // Remove index - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -341,7 +341,7 @@ class WebhooksCustomServerTest extends Scope /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -362,7 +362,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(201, $actors['headers']['status-code']); $this->assertNotEmpty($actors['body']['$id']); - $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey']