diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc20d1f6fb..3403973b0d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,7 +146,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Tables, + Databases/Grids, Functions, FunctionsSchedule, GraphQL, @@ -216,7 +216,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Tables, + Databases/Grids, Functions, FunctionsSchedule, GraphQL, 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 c077cbc94f..69cdf83180 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -1856,7 +1856,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2066,7 +2065,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4381,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4470,15 +4468,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4499,7 +4496,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4615,7 +4616,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4714,25 +4715,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -4846,7 +4861,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -4949,7 +4964,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -4996,12 +5011,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -5023,8 +5038,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -5084,9 +5099,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -5108,8 +5123,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -5123,10 +5138,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5148,30 +5162,6 @@ } ], "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", - "auth": { - "Admin": [], - "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": { @@ -5246,12 +5236,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5273,8 +5263,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -5344,9 +5334,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -5368,8 +5358,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -5383,13 +5373,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -5469,9 +5468,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5493,8 +5492,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -5575,9 +5574,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5592,8 +5591,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -5830,7 +5829,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } 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 22357e7b0b..4ee19cd594 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -1872,7 +1872,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2082,7 +2081,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4541,7 +4539,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4558,6 +4556,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [] } @@ -4614,7 +4660,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4631,6 +4677,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [] } @@ -4693,7 +4795,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4710,6 +4812,52 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -4765,7 +4913,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4782,6 +4930,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [] } @@ -4824,7 +5022,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4841,6 +5039,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [] } @@ -4900,7 +5154,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4917,6 +5171,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [] } @@ -4980,7 +5282,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5067,7 +5369,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5175,7 +5477,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5248,7 +5550,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5351,7 +5653,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5426,7 +5728,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5514,7 +5816,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5624,7 +5926,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5739,7 +6041,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -5849,7 +6151,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -5964,7 +6266,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6074,7 +6376,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6189,7 +6491,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6308,7 +6610,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6432,7 +6734,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6552,7 +6854,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6677,7 +6979,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -6797,7 +7099,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -6922,7 +7224,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7032,7 +7334,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7147,7 +7449,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7282,7 +7584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7403,7 +7705,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7523,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7633,7 +7935,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -7779,7 +8081,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -7854,7 +8156,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -7938,7 +8240,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8052,7 +8354,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8141,15 +8443,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8170,13 +8471,17 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8194,7 +8499,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8307,24 +8616,36 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8421,7 +8742,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8519,7 +8840,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8615,7 +8936,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8714,25 +9035,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8846,7 +9181,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -8949,7 +9284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9035,7 +9370,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9133,7 +9468,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9249,7 +9584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9364,7 +9699,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9450,7 +9785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9582,7 +9917,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9657,7 +9992,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -9741,7 +10076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -9828,7 +10163,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -9885,85 +10220,12 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.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": "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}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "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": { @@ -9980,13 +10242,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -10044,9 +10306,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "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": { @@ -10063,13 +10325,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -10145,12 +10407,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10167,13 +10429,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -10217,9 +10479,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10236,13 +10498,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -10323,9 +10585,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10335,13 +10597,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -10384,14 +10646,14 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10411,8 +10673,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -10468,12 +10730,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10495,8 +10757,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -10574,12 +10836,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10601,8 +10863,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -10685,12 +10947,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10712,8 +10974,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -10791,12 +11053,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10818,8 +11080,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10902,12 +11164,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10929,8 +11191,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -11008,12 +11270,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11035,8 +11297,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -11119,12 +11381,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11146,8 +11408,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -11234,12 +11496,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11261,8 +11523,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -11354,12 +11616,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11381,8 +11643,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -11470,12 +11732,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11497,8 +11759,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -11591,12 +11853,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11618,8 +11880,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -11707,12 +11969,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11734,8 +11996,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11828,12 +12090,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11855,8 +12117,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11934,12 +12196,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11961,8 +12223,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -12045,12 +12307,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12072,8 +12334,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -12176,12 +12438,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12203,8 +12465,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -12293,12 +12555,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12320,8 +12582,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -12409,12 +12671,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12436,8 +12698,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -12515,12 +12777,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12542,8 +12804,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -12626,12 +12888,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12684,8 +12946,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -12738,9 +13000,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12755,8 +13017,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12808,12 +13070,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12835,8 +13097,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12916,14 +13178,14 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12943,8 +13205,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -13001,11 +13263,11 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -13025,8 +13287,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -13126,12 +13388,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13153,8 +13415,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -13207,9 +13469,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13224,8 +13486,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -13277,12 +13539,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13299,13 +13561,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", + "method": "listTableLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "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}", @@ -13360,12 +13622,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -13387,8 +13649,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -13448,9 +13710,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -13472,8 +13734,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -13487,10 +13749,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13515,9 +13776,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13611,9 +13872,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "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": { @@ -13635,8 +13896,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -13649,12 +13910,20 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13721,9 +13990,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "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": { @@ -13745,8 +14014,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -13815,9 +14084,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13839,8 +14108,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13903,12 +14172,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13930,8 +14199,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -14001,9 +14270,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -14025,8 +14294,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -14040,13 +14309,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14126,9 +14404,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14150,8 +14428,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -14232,9 +14510,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14249,8 +14527,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -14306,12 +14584,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14333,8 +14611,8 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "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}", @@ -14399,12 +14677,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14426,8 +14704,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -14511,12 +14789,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14538,8 +14816,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -14623,12 +14901,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "tags": [ - "tables" + "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": { @@ -14645,13 +14923,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "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}", @@ -14692,7 +14970,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14715,6 +14993,131 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14735,7 +15138,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -14752,6 +15155,58 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -16796,7 +17251,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } @@ -43572,9 +44027,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43617,6 +44087,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43627,23 +44119,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43689,27 +44165,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45856,6 +46323,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45868,6 +46340,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45900,6 +46373,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45917,6 +46395,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -45950,6 +46429,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45967,6 +46451,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] 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 09572fe6b5..639817ac35 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -1879,7 +1879,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -1954,7 +1953,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4059,7 +4057,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4076,6 +4074,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4133,7 +4181,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4150,6 +4198,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [], "Key": [] @@ -4213,7 +4319,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4230,6 +4336,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4273,7 +4431,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4290,6 +4448,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4350,7 +4566,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4367,6 +4583,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4431,7 +4697,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4519,7 +4785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4628,7 +4894,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4702,7 +4968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -4806,7 +5072,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -4882,7 +5148,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -4971,7 +5237,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5082,7 +5348,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5198,7 +5464,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5309,7 +5575,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5425,7 +5691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5536,7 +5802,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5652,7 +5918,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5772,7 +6038,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -5897,7 +6163,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6018,7 +6284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6144,7 +6410,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6265,7 +6531,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6391,7 +6657,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6502,7 +6768,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6618,7 +6884,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6754,7 +7020,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -6876,7 +7142,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -6997,7 +7263,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7108,7 +7374,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7255,7 +7521,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7331,7 +7597,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7416,7 +7682,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7531,7 +7797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7622,15 +7888,15 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7651,12 +7917,17 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7675,7 +7946,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -7790,24 +8065,37 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -7905,7 +8193,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8004,7 +8292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8101,7 +8389,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8202,25 +8490,40 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8336,7 +8639,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8441,7 +8744,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8530,7 +8833,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8647,7 +8950,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -8763,7 +9066,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -8850,7 +9153,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -8983,7 +9286,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9059,7 +9362,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], @@ -9105,12 +9408,12 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "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": { @@ -9127,13 +9430,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -9192,9 +9495,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "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": { @@ -9211,13 +9514,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -9294,12 +9597,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9316,13 +9619,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -9367,9 +9670,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9386,13 +9689,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -9474,9 +9777,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9486,13 +9789,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -9536,14 +9839,14 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9563,8 +9866,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -9621,12 +9924,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9648,8 +9951,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -9728,12 +10031,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9755,8 +10058,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -9840,12 +10143,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9867,8 +10170,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -9947,12 +10250,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9974,8 +10277,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10059,12 +10362,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10086,8 +10389,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -10166,12 +10469,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10193,8 +10496,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -10278,12 +10581,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10305,8 +10608,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -10394,12 +10697,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10421,8 +10724,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -10515,12 +10818,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10542,8 +10845,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -10632,12 +10935,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10659,8 +10962,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -10754,12 +11057,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10781,8 +11084,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -10871,12 +11174,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10898,8 +11201,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -10993,12 +11296,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11020,8 +11323,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11100,12 +11403,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11127,8 +11430,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -11212,12 +11515,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11239,8 +11542,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -11344,12 +11647,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11371,8 +11674,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -11462,12 +11765,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11489,8 +11792,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -11579,12 +11882,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11606,8 +11909,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -11686,12 +11989,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11713,8 +12016,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -11798,12 +12101,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11856,8 +12159,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -11911,9 +12214,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11928,8 +12231,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -11982,12 +12285,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12009,8 +12312,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12091,14 +12394,14 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12118,8 +12421,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -12177,11 +12480,11 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -12201,8 +12504,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -12303,12 +12606,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12330,8 +12633,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -12385,9 +12688,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12402,8 +12705,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -12456,12 +12759,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -12483,8 +12786,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -12546,9 +12849,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -12570,8 +12873,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -12585,10 +12888,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12613,8 +12916,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12711,9 +13015,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "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": { @@ -12735,8 +13039,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -12749,12 +13053,21 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -12822,9 +13135,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "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": { @@ -12846,8 +13159,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -12917,9 +13230,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12941,8 +13254,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13006,12 +13319,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13033,8 +13346,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13106,9 +13419,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -13130,8 +13443,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -13145,13 +13458,23 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -13233,9 +13556,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13257,8 +13580,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -13341,9 +13664,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13358,8 +13681,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -13417,12 +13740,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13444,8 +13767,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -13530,12 +13853,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13557,8 +13880,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -15431,7 +15754,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } @@ -33199,9 +33522,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33244,6 +33582,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33254,23 +33614,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33316,27 +33660,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index e8efee6516..69cdf83180 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4379,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4468,15 +4468,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4497,7 +4496,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4613,7 +4616,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4712,25 +4715,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -4844,7 +4861,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -4947,7 +4964,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -4994,12 +5011,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -5021,8 +5038,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -5082,9 +5099,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -5106,8 +5123,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -5121,10 +5138,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5146,30 +5162,6 @@ } ], "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", - "auth": { - "Admin": [], - "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": { @@ -5244,12 +5236,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5271,8 +5263,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -5342,9 +5334,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -5366,8 +5358,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -5381,13 +5373,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -5467,9 +5468,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5491,8 +5492,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -5573,9 +5574,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5590,8 +5591,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -5828,7 +5829,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index b1c864453b..4ee19cd594 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4539,7 +4539,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4556,6 +4556,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [] } @@ -4612,7 +4660,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4629,6 +4677,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [] } @@ -4691,7 +4795,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4708,6 +4812,52 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "range" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -4763,7 +4913,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4780,6 +4930,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [] } @@ -4822,7 +5022,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4839,6 +5039,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [] } @@ -4898,7 +5154,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4915,6 +5171,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [] } @@ -4978,7 +5282,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5065,7 +5369,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5173,7 +5477,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5246,7 +5550,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5349,7 +5653,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5424,7 +5728,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5512,7 +5816,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5622,7 +5926,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5737,7 +6041,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -5847,7 +6151,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -5962,7 +6266,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6072,7 +6376,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6187,7 +6491,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6306,7 +6610,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6430,7 +6734,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6550,7 +6854,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6675,7 +6979,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -6795,7 +7099,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -6920,7 +7224,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7030,7 +7334,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7145,7 +7449,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7280,7 +7584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7401,7 +7705,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7521,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7631,7 +7935,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -7777,7 +8081,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -7852,7 +8156,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -7936,7 +8240,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8050,7 +8354,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8139,15 +8443,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8168,13 +8471,17 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8192,7 +8499,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8305,24 +8616,36 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8419,7 +8742,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8517,7 +8840,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8613,7 +8936,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8712,25 +9035,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8844,7 +9181,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -8947,7 +9284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9033,7 +9370,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9131,7 +9468,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9247,7 +9584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9362,7 +9699,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9448,7 +9785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9580,7 +9917,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9655,7 +9992,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -9739,7 +10076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -9826,7 +10163,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -9883,85 +10220,12 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.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": "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}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "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": { @@ -9978,13 +10242,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -10042,9 +10306,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "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": { @@ -10061,13 +10325,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -10143,12 +10407,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10165,13 +10429,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -10215,9 +10479,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10234,13 +10498,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -10321,9 +10585,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10333,13 +10597,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -10382,14 +10646,14 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10409,8 +10673,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -10466,12 +10730,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10493,8 +10757,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -10572,12 +10836,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10599,8 +10863,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -10683,12 +10947,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10710,8 +10974,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -10789,12 +11053,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10816,8 +11080,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10900,12 +11164,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10927,8 +11191,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -11006,12 +11270,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11033,8 +11297,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -11117,12 +11381,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11144,8 +11408,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -11232,12 +11496,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11259,8 +11523,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -11352,12 +11616,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11379,8 +11643,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -11468,12 +11732,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11495,8 +11759,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -11589,12 +11853,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11616,8 +11880,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -11705,12 +11969,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11732,8 +11996,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11826,12 +12090,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11853,8 +12117,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11932,12 +12196,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11959,8 +12223,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -12043,12 +12307,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12070,8 +12334,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -12174,12 +12438,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12201,8 +12465,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -12291,12 +12555,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12318,8 +12582,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -12407,12 +12671,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12434,8 +12698,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -12513,12 +12777,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12540,8 +12804,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -12624,12 +12888,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12682,8 +12946,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -12736,9 +13000,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12753,8 +13017,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12806,12 +13070,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12833,8 +13097,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12914,14 +13178,14 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12941,8 +13205,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -12999,11 +13263,11 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -13023,8 +13287,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -13124,12 +13388,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13151,8 +13415,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -13205,9 +13469,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13222,8 +13486,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -13275,12 +13539,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13297,13 +13561,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", + "method": "listTableLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "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}", @@ -13358,12 +13622,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -13385,8 +13649,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -13446,9 +13710,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -13470,8 +13734,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -13485,10 +13749,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13513,9 +13776,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13609,9 +13872,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "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": { @@ -13633,8 +13896,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -13647,12 +13910,20 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13719,9 +13990,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "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": { @@ -13743,8 +14014,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -13813,9 +14084,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13837,8 +14108,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13901,12 +14172,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13928,8 +14199,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13999,9 +14270,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -14023,8 +14294,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -14038,13 +14309,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14124,9 +14404,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14148,8 +14428,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -14230,9 +14510,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14247,8 +14527,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -14304,12 +14584,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14331,8 +14611,8 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "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}", @@ -14397,12 +14677,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14424,8 +14704,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -14509,12 +14789,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14536,8 +14816,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -14621,12 +14901,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "tags": [ - "tables" + "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": { @@ -14643,13 +14923,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "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}", @@ -14690,7 +14970,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14713,6 +14993,131 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14733,7 +15138,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -14750,6 +15155,58 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -16794,7 +17251,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } @@ -43570,9 +44027,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43615,6 +44087,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43625,23 +44119,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43687,27 +44165,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45854,6 +46323,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45866,6 +46340,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45898,6 +46373,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45915,6 +46395,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -45948,6 +46429,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45965,6 +46451,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 93336cf5ff..639817ac35 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4057,7 +4057,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4074,6 +4074,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4131,7 +4181,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4148,6 +4198,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [], "Key": [] @@ -4211,7 +4319,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4228,6 +4336,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4271,7 +4431,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4288,6 +4448,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4348,7 +4566,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4365,6 +4583,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4429,7 +4697,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4517,7 +4785,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4626,7 +4894,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4700,7 +4968,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -4804,7 +5072,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -4880,7 +5148,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -4969,7 +5237,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5080,7 +5348,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5196,7 +5464,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5307,7 +5575,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5423,7 +5691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5534,7 +5802,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5650,7 +5918,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5770,7 +6038,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -5895,7 +6163,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6016,7 +6284,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6142,7 +6410,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6263,7 +6531,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6389,7 +6657,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6500,7 +6768,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6616,7 +6884,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6752,7 +7020,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -6874,7 +7142,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -6995,7 +7263,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7106,7 +7374,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7253,7 +7521,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7329,7 +7597,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7414,7 +7682,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7529,7 +7797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7620,15 +7888,15 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7649,12 +7917,17 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7673,7 +7946,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -7788,24 +8065,37 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -7903,7 +8193,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8002,7 +8292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8099,7 +8389,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8200,25 +8490,40 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8334,7 +8639,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8439,7 +8744,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8528,7 +8833,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8645,7 +8950,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -8761,7 +9066,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -8848,7 +9153,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -8981,7 +9286,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9057,7 +9362,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], @@ -9103,12 +9408,12 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "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": { @@ -9125,13 +9430,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -9190,9 +9495,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "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": { @@ -9209,13 +9514,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -9292,12 +9597,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9314,13 +9619,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -9365,9 +9670,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9384,13 +9689,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -9472,9 +9777,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9484,13 +9789,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -9534,14 +9839,14 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9561,8 +9866,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -9619,12 +9924,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9646,8 +9951,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -9726,12 +10031,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9753,8 +10058,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -9838,12 +10143,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9865,8 +10170,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -9945,12 +10250,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9972,8 +10277,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10057,12 +10362,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10084,8 +10389,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -10164,12 +10469,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10191,8 +10496,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -10276,12 +10581,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10303,8 +10608,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -10392,12 +10697,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10419,8 +10724,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -10513,12 +10818,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10540,8 +10845,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -10630,12 +10935,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10657,8 +10962,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -10752,12 +11057,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10779,8 +11084,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -10869,12 +11174,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10896,8 +11201,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -10991,12 +11296,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11018,8 +11323,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11098,12 +11403,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11125,8 +11430,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -11210,12 +11515,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11237,8 +11542,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -11342,12 +11647,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11369,8 +11674,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -11460,12 +11765,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11487,8 +11792,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -11577,12 +11882,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11604,8 +11909,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -11684,12 +11989,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11711,8 +12016,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -11796,12 +12101,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11854,8 +12159,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -11909,9 +12214,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11926,8 +12231,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -11980,12 +12285,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12007,8 +12312,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12089,14 +12394,14 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12116,8 +12421,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -12175,11 +12480,11 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -12199,8 +12504,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -12301,12 +12606,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12328,8 +12633,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -12383,9 +12688,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12400,8 +12705,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -12454,12 +12759,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "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": { @@ -12481,8 +12786,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -12544,9 +12849,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "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": { @@ -12568,8 +12873,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -12583,10 +12888,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12611,8 +12916,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12709,9 +13015,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "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": { @@ -12733,8 +13039,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -12747,12 +13053,21 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -12820,9 +13135,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "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": { @@ -12844,8 +13159,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -12915,9 +13230,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12939,8 +13254,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13004,12 +13319,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13031,8 +13346,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13104,9 +13419,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "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": { @@ -13128,8 +13443,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -13143,13 +13458,23 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -13231,9 +13556,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13255,8 +13580,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -13339,9 +13664,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13356,8 +13681,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -13415,12 +13740,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13442,8 +13767,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -13528,12 +13853,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13555,8 +13880,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -15429,7 +15754,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "" } } } @@ -33197,9 +33522,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33242,6 +33582,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33252,23 +33614,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33314,27 +33660,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index f2b814e9b6..21264f2afb 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -1964,7 +1964,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2175,7 +2174,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4522,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4607,15 +4605,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4636,7 +4633,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4749,7 +4750,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4842,25 +4843,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -4969,7 +4984,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -5069,7 +5084,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -5110,16 +5125,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5137,8 +5152,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -5192,7 +5207,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -5200,7 +5215,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5218,8 +5233,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -5232,10 +5247,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5257,30 +5271,6 @@ } ], "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", - "auth": { - "Admin": [], - "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": { @@ -5353,16 +5343,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5380,8 +5370,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -5443,7 +5433,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -5451,7 +5441,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5469,8 +5459,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -5483,13 +5473,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -5563,7 +5562,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -5571,7 +5570,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5589,8 +5588,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -5664,13 +5663,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5685,8 +5684,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -5916,7 +5915,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 94fff6695c..c8597b8b80 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -1990,7 +1990,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2201,7 +2200,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4701,7 +4699,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4718,6 +4716,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [] } @@ -4773,7 +4819,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4790,6 +4836,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [] } @@ -4855,7 +4957,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4872,6 +4974,52 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "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, 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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -4925,7 +5073,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4942,6 +5090,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [] } @@ -4984,7 +5182,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -5001,6 +5199,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [] } @@ -5062,7 +5316,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5079,6 +5333,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [] } @@ -5140,7 +5442,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5224,7 +5526,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5333,7 +5635,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5404,7 +5706,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5509,7 +5811,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5580,7 +5882,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5665,7 +5967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5775,7 +6077,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5887,7 +6189,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -5997,7 +6299,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6109,7 +6411,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6219,7 +6521,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6331,7 +6633,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6451,7 +6753,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6573,7 +6875,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6695,7 +6997,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6819,7 +7121,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -6941,7 +7243,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7065,7 +7367,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7175,7 +7477,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7287,7 +7589,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7424,7 +7726,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7547,7 +7849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7665,7 +7967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7775,7 +8077,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -7916,7 +8218,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -7989,7 +8291,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8069,7 +8371,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8176,7 +8478,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8261,15 +8563,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8290,13 +8591,17 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8314,7 +8619,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8427,24 +8736,36 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8538,7 +8859,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8634,7 +8955,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8724,7 +9045,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8817,25 +9138,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8944,7 +9279,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9044,7 +9379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9124,7 +9459,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9217,7 +9552,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9327,7 +9662,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9434,7 +9769,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9517,7 +9852,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9648,7 +9983,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9721,7 +10056,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -9799,7 +10134,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -9881,7 +10216,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -9932,86 +10267,16 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -10024,13 +10289,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -10083,7 +10348,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -10091,7 +10356,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -10104,13 +10369,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -10187,16 +10452,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10209,13 +10474,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -10255,7 +10520,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -10263,7 +10528,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10276,13 +10541,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -10361,13 +10626,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10377,13 +10642,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -10422,18 +10687,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10449,8 +10714,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -10501,10 +10766,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -10512,7 +10777,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10530,8 +10795,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -10607,10 +10872,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -10618,7 +10883,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10636,8 +10901,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -10715,10 +10980,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10726,7 +10991,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10744,8 +11009,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -10821,10 +11086,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10832,7 +11097,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10850,8 +11115,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10929,10 +11194,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10940,7 +11205,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10958,8 +11223,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -11035,10 +11300,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -11046,7 +11311,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11064,8 +11329,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -11143,10 +11408,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -11154,7 +11419,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11172,8 +11437,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -11259,10 +11524,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -11270,7 +11535,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11288,8 +11553,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -11377,10 +11642,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -11388,7 +11653,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11406,8 +11671,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -11495,10 +11760,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -11506,7 +11771,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11524,8 +11789,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -11615,10 +11880,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -11626,7 +11891,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11644,8 +11909,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -11733,10 +11998,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -11744,7 +12009,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11762,8 +12027,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11853,10 +12118,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11864,7 +12129,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11882,8 +12147,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11959,10 +12224,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11970,7 +12235,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11988,8 +12253,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -12067,10 +12332,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12078,7 +12343,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12096,8 +12361,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -12200,10 +12465,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -12211,7 +12476,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12229,8 +12494,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -12319,10 +12584,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -12330,7 +12595,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12348,8 +12613,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -12433,10 +12698,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -12444,7 +12709,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12462,8 +12727,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -12539,10 +12804,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -12550,7 +12815,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12568,8 +12833,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -12647,16 +12912,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12705,8 +12970,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -12753,13 +13018,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12774,8 +13039,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12821,10 +13086,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12832,7 +13097,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12850,8 +13115,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12925,18 +13190,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12952,8 +13217,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -13005,7 +13270,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -13013,9 +13278,9 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -13031,8 +13296,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -13131,16 +13396,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13158,8 +13423,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -13206,13 +13471,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13227,8 +13492,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -13274,16 +13539,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13296,13 +13561,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", + "method": "listTableLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "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}", @@ -13352,16 +13617,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13379,8 +13644,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -13434,7 +13699,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -13442,7 +13707,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13460,8 +13725,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -13474,10 +13739,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13502,9 +13766,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13596,7 +13860,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -13604,7 +13868,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13622,8 +13886,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -13636,12 +13900,20 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13703,7 +13975,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -13711,7 +13983,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13729,8 +14001,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -13795,7 +14067,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -13803,7 +14075,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13821,8 +14093,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13880,16 +14152,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13907,8 +14179,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13970,7 +14242,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13978,7 +14250,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13996,8 +14268,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -14010,13 +14282,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14090,7 +14371,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -14098,7 +14379,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14116,8 +14397,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -14191,13 +14472,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14212,8 +14493,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -14262,16 +14543,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14289,8 +14570,8 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "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}", @@ -14348,10 +14629,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -14359,7 +14640,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14377,8 +14658,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -14454,10 +14735,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -14465,7 +14746,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14483,8 +14764,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -14560,16 +14841,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -14582,13 +14863,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "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}", @@ -14626,7 +14907,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14646,6 +14927,128 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14666,7 +15069,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -14683,6 +15086,58 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -16733,7 +17188,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } @@ -43631,9 +44086,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43676,6 +44146,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43686,23 +44178,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43748,27 +44224,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45924,6 +46391,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45936,6 +46408,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45968,6 +46441,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45985,6 +46463,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -46018,6 +46497,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -46035,6 +46519,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index cb96855956..a7f93152d1 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -1996,7 +1996,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2075,7 +2074,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4207,7 +4205,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4224,6 +4222,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4280,7 +4328,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4297,6 +4345,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [], "Key": [] @@ -4363,7 +4469,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4380,6 +4486,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4423,7 +4581,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4440,6 +4598,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4502,7 +4718,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4519,6 +4735,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4581,7 +4847,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4666,7 +4932,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4776,7 +5042,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4848,7 +5114,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -4954,7 +5220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5026,7 +5292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5112,7 +5378,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5223,7 +5489,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5336,7 +5602,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5447,7 +5713,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5560,7 +5826,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5671,7 +5937,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5784,7 +6050,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5905,7 +6171,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6028,7 +6294,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6151,7 +6417,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6276,7 +6542,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6399,7 +6665,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6524,7 +6790,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6635,7 +6901,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6748,7 +7014,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6886,7 +7152,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7010,7 +7276,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7129,7 +7395,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7240,7 +7506,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7382,7 +7648,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7456,7 +7722,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7537,7 +7803,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7645,7 +7911,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7732,15 +7998,15 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7761,12 +8027,17 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7785,7 +8056,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -7900,24 +8175,37 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8012,7 +8300,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8109,7 +8397,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8200,7 +8488,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8295,25 +8583,40 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8424,7 +8727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8526,7 +8829,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8611,7 +8914,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8722,7 +9025,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -8830,7 +9133,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -8914,7 +9217,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9046,7 +9349,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9120,7 +9423,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], @@ -9160,16 +9463,16 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -9182,13 +9485,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -9242,7 +9545,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -9250,7 +9553,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -9263,13 +9566,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -9347,16 +9650,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9369,13 +9672,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -9416,7 +9719,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -9424,7 +9727,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9437,13 +9740,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -9523,13 +9826,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9539,13 +9842,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -9585,18 +9888,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9612,8 +9915,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -9665,10 +9968,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -9676,7 +9979,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9694,8 +9997,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -9772,10 +10075,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -9783,7 +10086,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9801,8 +10104,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -9881,10 +10184,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9892,7 +10195,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9910,8 +10213,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -9988,10 +10291,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9999,7 +10302,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10017,8 +10320,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10097,10 +10400,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10108,7 +10411,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10126,8 +10429,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -10204,10 +10507,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -10215,7 +10518,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10233,8 +10536,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -10313,10 +10616,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -10324,7 +10627,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10342,8 +10645,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -10430,10 +10733,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -10441,7 +10744,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10459,8 +10762,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -10549,10 +10852,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -10560,7 +10863,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10578,8 +10881,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -10668,10 +10971,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -10679,7 +10982,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10697,8 +11000,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -10789,10 +11092,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -10800,7 +11103,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10818,8 +11121,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -10908,10 +11211,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -10919,7 +11222,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10937,8 +11240,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11029,10 +11332,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11040,7 +11343,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11058,8 +11361,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11136,10 +11439,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11147,7 +11450,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11165,8 +11468,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -11245,10 +11548,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -11256,7 +11559,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11274,8 +11577,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -11379,10 +11682,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -11390,7 +11693,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11408,8 +11711,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -11499,10 +11802,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -11510,7 +11813,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11528,8 +11831,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -11614,10 +11917,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -11625,7 +11928,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11643,8 +11946,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -11721,10 +12024,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -11732,7 +12035,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11750,8 +12053,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -11830,16 +12133,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11888,8 +12191,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -11937,13 +12240,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11958,8 +12261,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12006,10 +12309,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12017,7 +12320,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12035,8 +12338,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12111,18 +12414,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12138,8 +12441,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -12192,7 +12495,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -12200,9 +12503,9 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -12218,8 +12521,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -12319,16 +12622,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12346,8 +12649,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -12395,13 +12698,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12416,8 +12719,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -12464,16 +12767,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12491,8 +12794,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -12548,7 +12851,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -12556,7 +12859,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12574,8 +12877,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -12588,10 +12891,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12616,8 +12919,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12712,7 +13016,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -12720,7 +13024,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12738,8 +13042,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -12752,12 +13056,21 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -12820,7 +13133,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -12828,7 +13141,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12846,8 +13159,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -12913,7 +13226,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -12921,7 +13234,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12939,8 +13252,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -12999,16 +13312,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13026,8 +13339,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13091,7 +13404,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13099,7 +13412,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13117,8 +13430,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -13131,13 +13444,23 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -13213,7 +13536,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -13221,7 +13544,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13239,8 +13562,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -13316,13 +13639,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13337,8 +13660,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -13389,10 +13712,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -13400,7 +13723,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13418,8 +13741,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -13496,10 +13819,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -13507,7 +13830,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13525,8 +13848,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -15411,7 +15734,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } @@ -33344,9 +33667,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33389,6 +33727,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33399,23 +33759,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33461,27 +33805,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index b28e544566..21264f2afb 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4520,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4605,15 +4605,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4634,7 +4633,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4747,7 +4750,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4840,25 +4843,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -4967,7 +4984,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -5067,7 +5084,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -5108,16 +5125,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5135,8 +5152,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -5190,7 +5207,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -5198,7 +5215,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5216,8 +5233,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -5230,10 +5247,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5255,30 +5271,6 @@ } ], "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", - "auth": { - "Admin": [], - "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": { @@ -5351,16 +5343,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5378,8 +5370,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -5441,7 +5433,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -5449,7 +5441,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -5467,8 +5459,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -5481,13 +5473,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -5561,7 +5562,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -5569,7 +5570,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5587,8 +5588,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -5662,13 +5663,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5683,8 +5684,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -5914,7 +5915,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index ba212cba1a..c8597b8b80 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4699,7 +4699,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4716,6 +4716,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [] } @@ -4771,7 +4819,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4788,6 +4836,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [] } @@ -4853,7 +4957,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4870,6 +4974,52 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "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, 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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -4923,7 +5073,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4940,6 +5090,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [] } @@ -4982,7 +5182,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4999,6 +5199,62 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [] } @@ -5060,7 +5316,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5077,6 +5333,54 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [] } @@ -5138,7 +5442,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5222,7 +5526,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5331,7 +5635,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5402,7 +5706,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5507,7 +5811,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5578,7 +5882,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5663,7 +5967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5773,7 +6077,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5885,7 +6189,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -5995,7 +6299,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6107,7 +6411,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6217,7 +6521,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6329,7 +6633,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6449,7 +6753,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6571,7 +6875,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6693,7 +6997,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6817,7 +7121,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -6939,7 +7243,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7063,7 +7367,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7173,7 +7477,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7285,7 +7589,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7422,7 +7726,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7545,7 +7849,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7663,7 +7967,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7773,7 +8077,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -7914,7 +8218,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -7987,7 +8291,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8067,7 +8371,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8174,7 +8478,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8259,15 +8563,14 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8288,13 +8591,17 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8312,7 +8619,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8425,24 +8736,36 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8536,7 +8859,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8632,7 +8955,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8722,7 +9045,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8815,25 +9138,39 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8942,7 +9279,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9042,7 +9379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9122,7 +9459,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9215,7 +9552,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9325,7 +9662,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9432,7 +9769,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9515,7 +9852,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9646,7 +9983,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9719,7 +10056,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -9797,7 +10134,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -9879,7 +10216,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -9930,86 +10267,16 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - }, - "default": [], - "in": "query" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -10022,13 +10289,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -10081,7 +10348,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -10089,7 +10356,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -10102,13 +10369,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -10185,16 +10452,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10207,13 +10474,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -10253,7 +10520,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -10261,7 +10528,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10274,13 +10541,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -10359,13 +10626,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10375,13 +10642,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -10420,18 +10687,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10447,8 +10714,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -10499,10 +10766,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -10510,7 +10777,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10528,8 +10795,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -10605,10 +10872,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -10616,7 +10883,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10634,8 +10901,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -10713,10 +10980,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10724,7 +10991,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10742,8 +11009,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -10819,10 +11086,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10830,7 +11097,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10848,8 +11115,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10927,10 +11194,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10938,7 +11205,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10956,8 +11223,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -11033,10 +11300,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -11044,7 +11311,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11062,8 +11329,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -11141,10 +11408,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -11152,7 +11419,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11170,8 +11437,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -11257,10 +11524,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -11268,7 +11535,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11286,8 +11553,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -11375,10 +11642,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -11386,7 +11653,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11404,8 +11671,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -11493,10 +11760,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -11504,7 +11771,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11522,8 +11789,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -11613,10 +11880,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -11624,7 +11891,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11642,8 +11909,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -11731,10 +11998,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -11742,7 +12009,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11760,8 +12027,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11851,10 +12118,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11862,7 +12129,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11880,8 +12147,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11957,10 +12224,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11968,7 +12235,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11986,8 +12253,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -12065,10 +12332,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12076,7 +12343,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12094,8 +12361,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -12198,10 +12465,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -12209,7 +12476,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12227,8 +12494,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -12317,10 +12584,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -12328,7 +12595,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12346,8 +12613,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -12431,10 +12698,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -12442,7 +12709,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12460,8 +12727,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -12537,10 +12804,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -12548,7 +12815,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12566,8 +12833,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -12645,16 +12912,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12703,8 +12970,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -12751,13 +13018,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12772,8 +13039,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12819,10 +13086,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12830,7 +13097,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12848,8 +13115,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12923,18 +13190,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12950,8 +13217,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -13003,7 +13270,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -13011,9 +13278,9 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -13029,8 +13296,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -13129,16 +13396,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13156,8 +13423,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -13204,13 +13471,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13225,8 +13492,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -13272,16 +13539,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13294,13 +13561,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", + "method": "listTableLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "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}", @@ -13350,16 +13617,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13377,8 +13644,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -13432,7 +13699,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -13440,7 +13707,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13458,8 +13725,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -13472,10 +13739,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13500,9 +13766,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13594,7 +13860,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -13602,7 +13868,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13620,8 +13886,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -13634,12 +13900,20 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13701,7 +13975,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -13709,7 +13983,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13727,8 +14001,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -13793,7 +14067,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -13801,7 +14075,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13819,8 +14093,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -13878,16 +14152,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13905,8 +14179,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13968,7 +14242,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13976,7 +14250,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13994,8 +14268,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -14008,13 +14282,22 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14088,7 +14371,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -14096,7 +14379,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14114,8 +14397,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -14189,13 +14472,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14210,8 +14493,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -14260,16 +14543,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14287,8 +14570,8 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "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}", @@ -14346,10 +14629,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -14357,7 +14640,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14375,8 +14658,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -14452,10 +14735,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -14463,7 +14746,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14481,8 +14764,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -14558,16 +14841,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -14580,13 +14863,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "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}", @@ -14624,7 +14907,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14644,6 +14927,128 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14664,7 +15069,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -14681,6 +15086,58 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } + }, + { + "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": { "Project": [] } @@ -16731,7 +17188,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } @@ -43629,9 +44086,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43674,6 +44146,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43684,23 +44178,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43746,27 +44224,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45922,6 +46391,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45934,6 +46408,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45966,6 +46441,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45983,6 +46463,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -46016,6 +46497,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -46033,6 +46519,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 9bd6c58fcc..a7f93152d1 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4205,7 +4205,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4222,6 +4222,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4278,7 +4328,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4295,6 +4345,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.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": { "Project": [], "Key": [] @@ -4361,7 +4469,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4378,6 +4486,58 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4421,7 +4581,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4438,6 +4598,64 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4500,7 +4718,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4517,6 +4735,56 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } + }, + { + "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": { "Project": [], "Key": [] @@ -4579,7 +4847,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4664,7 +4932,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4774,7 +5042,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4846,7 +5114,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -4952,7 +5220,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5024,7 +5292,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5110,7 +5378,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5221,7 +5489,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5334,7 +5602,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5445,7 +5713,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5558,7 +5826,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5669,7 +5937,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5782,7 +6050,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5903,7 +6171,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6026,7 +6294,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6149,7 +6417,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6274,7 +6542,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6397,7 +6665,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6522,7 +6790,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6633,7 +6901,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6746,7 +7014,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6884,7 +7152,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7008,7 +7276,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7127,7 +7395,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7238,7 +7506,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7380,7 +7648,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7454,7 +7722,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7535,7 +7803,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7643,7 +7911,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7730,15 +7998,15 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7759,12 +8027,17 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7783,7 +8056,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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -7898,24 +8175,37 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, "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": "**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", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8010,7 +8300,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8107,7 +8397,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8198,7 +8488,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8293,25 +8583,40 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, "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": "**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.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -8422,7 +8727,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8524,7 +8829,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8609,7 +8914,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8720,7 +9025,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -8828,7 +9133,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -8912,7 +9217,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9044,7 +9349,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9118,7 +9423,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], @@ -9158,16 +9463,16 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -9180,13 +9485,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "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}", @@ -9240,7 +9545,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -9248,7 +9553,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -9261,13 +9566,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "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}", @@ -9345,16 +9650,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9367,13 +9672,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "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}", @@ -9414,7 +9719,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -9422,7 +9727,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9435,13 +9740,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "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}", @@ -9521,13 +9826,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9537,13 +9842,13 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "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}", @@ -9583,18 +9888,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9610,8 +9915,8 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "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}", @@ -9663,10 +9968,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -9674,7 +9979,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9692,8 +9997,8 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "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}", @@ -9770,10 +10075,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -9781,7 +10086,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9799,8 +10104,8 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "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}", @@ -9879,10 +10184,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9890,7 +10195,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9908,8 +10213,8 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "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}", @@ -9986,10 +10291,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9997,7 +10302,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10015,8 +10320,8 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "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}", @@ -10095,10 +10400,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10106,7 +10411,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10124,8 +10429,8 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "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}", @@ -10202,10 +10507,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -10213,7 +10518,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10231,8 +10536,8 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "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}", @@ -10311,10 +10616,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -10322,7 +10627,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10340,8 +10645,8 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "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}", @@ -10428,10 +10733,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -10439,7 +10744,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10457,8 +10762,8 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "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}", @@ -10547,10 +10852,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -10558,7 +10863,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10576,8 +10881,8 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "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}", @@ -10666,10 +10971,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -10677,7 +10982,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10695,8 +11000,8 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "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}", @@ -10787,10 +11092,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -10798,7 +11103,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10816,8 +11121,8 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "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}", @@ -10906,10 +11211,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -10917,7 +11222,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10935,8 +11240,8 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "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}", @@ -11027,10 +11332,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11038,7 +11343,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11056,8 +11361,8 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "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}", @@ -11134,10 +11439,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11145,7 +11450,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11163,8 +11468,8 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "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}", @@ -11243,10 +11548,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -11254,7 +11559,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11272,8 +11577,8 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "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}", @@ -11377,10 +11682,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -11388,7 +11693,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11406,8 +11711,8 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "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}", @@ -11497,10 +11802,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -11508,7 +11813,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11526,8 +11831,8 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "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}", @@ -11612,10 +11917,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -11623,7 +11928,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11641,8 +11946,8 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "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}", @@ -11719,10 +12024,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -11730,7 +12035,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11748,8 +12053,8 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "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}", @@ -11828,16 +12133,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11886,8 +12191,8 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "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}", @@ -11935,13 +12240,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11956,8 +12261,8 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "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}", @@ -12004,10 +12309,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12015,7 +12320,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12033,8 +12338,8 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "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}", @@ -12109,18 +12414,18 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12136,8 +12441,8 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "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}", @@ -12190,7 +12495,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -12198,9 +12503,9 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the 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", @@ -12216,8 +12521,8 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "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}", @@ -12317,16 +12622,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12344,8 +12649,8 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "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}", @@ -12393,13 +12698,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12414,8 +12719,8 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "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}", @@ -12462,16 +12767,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12489,8 +12794,8 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "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}", @@ -12546,7 +12851,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -12554,7 +12859,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12572,8 +12877,8 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "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}", @@ -12586,10 +12891,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12614,8 +12919,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12710,7 +13016,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -12718,7 +13024,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12736,8 +13042,8 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "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}", @@ -12750,12 +13056,21 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -12818,7 +13133,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -12826,7 +13141,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -12844,8 +13159,8 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "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}", @@ -12911,7 +13226,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -12919,7 +13234,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12937,8 +13252,8 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "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}", @@ -12997,16 +13312,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13024,8 +13339,8 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "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}", @@ -13089,7 +13404,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13097,7 +13412,7 @@ "application\/json" ], "tags": [ - "tables" + "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": { @@ -13115,8 +13430,8 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "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}", @@ -13129,13 +13444,23 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -13211,7 +13536,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -13219,7 +13544,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13237,8 +13562,8 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "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}", @@ -13314,13 +13639,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13335,8 +13660,8 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "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}", @@ -13387,10 +13712,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -13398,7 +13723,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13416,8 +13741,8 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "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}", @@ -13494,10 +13819,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -13505,7 +13830,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13523,8 +13848,8 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "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}", @@ -15409,7 +15734,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "" } } } @@ -33342,9 +33667,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33387,6 +33727,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33397,23 +33759,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33459,27 +33805,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/composer.json b/composer.json index b913bc247e..659d6221f7 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.41.*", + "appwrite/sdk-generator": "0.*.*", "phpunit/phpunit": "9.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", diff --git a/composer.lock b/composer.lock index 0f4b44e2ea..718dbaf64b 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": "ee81ef96c463854d58fd5678c28ad896", + "content-hash": "f4876940be4499bea26a77a036dece4f", "packages": [ { "name": "adhocore/jwt", 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 9329300ffa..e7c9814655 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -20,7 +20,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = TABLES; } @@ -64,7 +64,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** 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 3f331edc9a..765741ef41 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,7 +37,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = COLUMNS; } @@ -77,7 +77,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** 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 04fc96456e..ba44cf5900 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: 'tables.createBooleanColumn', + replaceWith: 'grids.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 487eca769f..2c46e457b8 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: 'tables.updateBooleanColumn', + replaceWith: 'grids.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 a750a53d75..693b87726e 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: 'tables.createDatetimeColumn', + replaceWith: 'grids.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 8d7a383cf1..3bc76b5ecb 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: 'tables.updateDatetimeColumn', + replaceWith: 'grids.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 67ee8d814d..c86bb956f9 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: 'tables.deleteColumn', + replaceWith: 'grids.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 9037ce1dcb..6638622bae 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: 'tables.createEmailColumn', + replaceWith: 'grids.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 bfe9733449..66d0e611b4 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: 'tables.updateEmailColumn', + replaceWith: 'grids.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 b54dd1c0ad..414aa12e1b 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: 'tables.createEnumColumn', + replaceWith: 'grids.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 2fde9eaecc..201af5c394 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: 'tables.updateEnumColumn', + replaceWith: 'grids.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 bc1eb2d4c9..4d2bb1f827 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: 'tables.createFloatColumn', + replaceWith: 'grids.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 cb770067ff..74e81210be 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: 'tables.updateFloatColumn', + replaceWith: 'grids.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 a9d4d36758..5fedfc608a 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: 'tables.getColumn', + replaceWith: 'grids.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 e49b775a54..a022fe39a9 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: 'tables.createIpColumn', + replaceWith: 'grids.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 44b8347807..70495b1755 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: 'tables.updateIpColumn', + replaceWith: 'grids.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 ea8a38e6c1..d7c345759d 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: 'tables.createIntegerColumn', + replaceWith: 'grids.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 39e8bad1f9..c29f634114 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: 'tables.updateIntegerColumn', + replaceWith: 'grids.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 a062b96a36..a4112bacd1 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: 'tables.createRelationshipColumn', + replaceWith: 'grids.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 08a6475bb0..b71d7175a0 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: 'tables.updateRelationshipColumn', + replaceWith: 'grids.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 c1692c77d6..d3fa0a01dc 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: 'tables.createStringColumn', + replaceWith: 'grids.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 770854f0f9..e450abe88a 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: 'tables.updateStringColumn', + replaceWith: 'grids.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 d471cf24f1..86474d4ca4 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: 'tables.createUrlColumn', + replaceWith: 'grids.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 dc475194c8..c3e6456c11 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: 'tables.updateUrlColumn', + replaceWith: 'grids.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 f4ff635759..7b01e7c4fa 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: 'tables.listColumns', + replaceWith: 'grids.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 a88652b9e1..c3fdd372ee 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: 'tables.create', + replaceWith: 'grids.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 642d0d0978..f6755f7437 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: 'tables.delete', + replaceWith: 'grids.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 bfebca4cf7..9a1c5f3dad 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 @@ -22,7 +22,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = ROWS; } @@ -72,7 +72,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** 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 cb38f8f75e..49a408e64c 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 @@ -65,7 +65,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.decrementRowColumn', + replaceWith: 'grids.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 82b688caae..5eadc96b9e 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 @@ -65,7 +65,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.incrementRowColumn', + replaceWith: 'grids.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 e6ce45f2f9..440927d45c 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 @@ -63,7 +63,7 @@ class Delete extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.deleteRows', + replaceWith: 'grids.deleteRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 e153d0af20..daa7179395 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 @@ -66,7 +66,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateRows', + replaceWith: 'grids.updateRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 687a426a3a..6b5da25a2c 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: 'tables.upsertRows', + replaceWith: 'grids.upsertRows', ), ) ]) 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 64b1280eff..46bf9c3f55 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 @@ -84,7 +84,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createRow', + replaceWith: 'grids.createRow', ), ), new Method( @@ -107,7 +107,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createRows', + replaceWith: 'grids.createRows', ), ) ]) 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 8b0b43c05e..7bc81ab7db 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: 'tables.deleteRow', + replaceWith: 'grids.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 35463d2d40..f3e2a24672 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: 'tables.getRow', + replaceWith: 'grids.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 482b0fb05c..f8ae29bd3e 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: 'tables.listLogs', + replaceWith: 'grids.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 450f555dd2..0be66f0f40 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: 'tables.updateRow', + replaceWith: 'grids.updateRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 f514237fdf..c42b4ee6fd 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: 'tables.upsertRow', + replaceWith: 'grids.upsertRow', ), ), ]) 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 9c00f9548c..42fe51e09a 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: 'tables.listRows', + replaceWith: 'grids.listRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 67c6cea5f3..3dfff2a621 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: 'tables.get', + replaceWith: 'grids.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 33c2977be5..bafa9d0b91 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,7 +19,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = COLUMN_INDEX; } @@ -63,7 +63,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** 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 a826ade364..5ba1fff5bf 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: 'tables.createIndex', + replaceWith: 'grids.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 1b62e2bec8..80ccd8fadf 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: 'tables.deleteIndex', + replaceWith: 'grids.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 957ca98f61..475835538a 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: 'tables.getIndex', + replaceWith: 'grids.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 ed570d8abd..643360c12d 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: 'tables.listIndexes', + replaceWith: 'grids.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 9527859efa..0eca31e679 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: 'tables.listLogs', + replaceWith: 'grids.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 cc29b6ea66..09b3ee2b35 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: 'tables.update', + replaceWith: 'grids.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 d829d18714..ec46f77581 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: 'tables.getUsage', + replaceWith: 'grids.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 13269834a2..1b2f3cab32 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: 'tables.list', + replaceWith: 'grids.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 38374402fb..9b52b482bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; @@ -42,20 +43,40 @@ class Create extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'create', - description: '/docs/references/databases/create.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'create', + description: '/docs/references/databases/create.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.createDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + 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) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 56cf1a4296..388b5edf7e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -34,20 +35,40 @@ class Delete extends Action ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'delete', - description: '/docs/references/databases/delete.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_NOCONTENT, - model: UtopiaResponse::MODEL_NONE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'delete', + description: '/docs/references/databases/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.deleteDatabase', ) - ], - contentType: ContentType::NONE - )) + ), + 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') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index f478dc7917..a3ac4d0da0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -29,20 +30,40 @@ class Get extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'get', - description: '/docs/references/databases/get.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'get', + description: '/docs/references/databases/get.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.getDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + 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') ->inject('dbForProject') 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 52f2ad93b6..5828b9f8b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Logs; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -41,20 +42,40 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'logs', - name: 'listLogs', - description: '/docs/references/databases/get-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_LOG_LIST, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'logs', + name: 'listLogs', + description: '/docs/references/databases/get-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabaseLogs', ) - ], - contentType: ContentType::JSON - )) + ), + 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) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index a746f4ce4c..b2b268075c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -35,20 +36,40 @@ class Update extends Action ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'update', - description: '/docs/references/databases/update.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'update', + description: '/docs/references/databases/update.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.updateDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + 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.') ->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) 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 56fcc29688..8efb6ae0ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -34,20 +35,41 @@ class Get extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: null, - name: self::getName(), - description: '/docs/references/databases/get-database-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: null, + name: self::getName(), + description: '/docs/references/databases/get-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.' . self::getName(), ) - ], - contentType: ContentType::JSON, - )) + ), + 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) ->inject('response') 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 b5c898fd1b..31d520611e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -32,20 +33,40 @@ class XList extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: null, - name: self::getName(), - description: '/docs/references/databases/list-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASES, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: null, + name: self::getName(), + description: '/docs/references/databases/list-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabaseUsage' ) - ], - contentType: ContentType::JSON - )) + ), + 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') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 52f3fd2b55..fdf3428101 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Databases; @@ -35,20 +36,40 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'list', - description: '/docs/references/databases/list.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE_LIST, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'list', + description: '/docs/references/databases/list.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabases', ) - ], - contentType: ContentType::JSON - )) + ), + 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) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php index e0f1992ccb..baa4eaa146 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean') ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') @@ -40,7 +40,7 @@ class Create extends BooleanCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-boolean-column.md', + description: '/docs/references/grids/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php index 888f31d9bd..2ea5314163 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -42,7 +42,7 @@ class Update extends BooleanUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-boolean-column.md', + description: '/docs/references/grids/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php index 63110c9c6a..501cc044d4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) ->label('scope', 'tables.write') @@ -42,7 +42,7 @@ class Create extends DatetimeCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-datetime-column.md', + description: '/docs/references/grids/create-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php index 33c8ff9f94..34384e4d35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -44,7 +44,7 @@ class Update extends DatetimeUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-datetime-column.md', + description: '/docs/references/grids/update-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php index 923ae3ee24..d0934b799f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Delete extends AttributesDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-column.md', + description: '/docs/references/grids/delete-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php index fe4170c74e..841d18016f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Create extends EmailCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-email-column.md', + description: '/docs/references/grids/create-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php index 8f4fd5ca8f..f162a18494 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Update extends EmailUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-email-column.md', + description: '/docs/references/grids/update-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php index f64ededb8f..430d3f0220 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Create extends EnumCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-enum-column.md', + description: '/docs/references/grids/create-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php index 77bd07bdcd..6562742937 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -45,7 +45,7 @@ class Update extends EnumUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-enum-column.md', + description: '/docs/references/grids/update-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php index ce7d55c880..4dd9c53950 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Create extends FloatCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-float-column.md', + description: '/docs/references/grids/create-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php index 31f4bd61ec..3130e8ba2e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Update extends FloatUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-float-column.md', + description: '/docs/references/grids/update-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php index 24071db6b1..295a4ff530 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/get-column.md', + description: '/docs/references/grids/get-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php index fcaf3f0a8b..beae222ceb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Create extends IPCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-ip-column.md', + description: '/docs/references/grids/create-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php index 38759e4654..c187c06801 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Update extends IPUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-ip-column.md', + description: '/docs/references/grids/update-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php index 67848f7ef9..f97f4079ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Create extends IntegerCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-integer-column.md', + description: '/docs/references/grids/create-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php index 27779abe3b..ad4832ed10 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Update extends IntegerUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-integer-column.md', + description: '/docs/references/grids/update-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php index f1a0fd9601..c340d1c574 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) ->label('scope', 'tables.write') @@ -42,7 +42,7 @@ class Create extends RelationshipCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-relationship-column.md', + description: '/docs/references/grids/create-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php index 1385e157de..0811025ae3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -42,7 +42,7 @@ class Update extends RelationshipUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-relationship-column.md', + description: '/docs/references/grids/update-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php index 2dc1466a67..4ae844fd84 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Create extends StringCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-string-column.md', + description: '/docs/references/grids/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php index 9e1034dbcc..ed54ae9139 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -45,7 +45,7 @@ class Update extends StringUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-string-column.md', + description: '/docs/references/grids/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php index 65b1387a11..7ae3214cb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -41,7 +41,7 @@ class Create extends URLCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-url-column.md', + description: '/docs/references/grids/create-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php index 34fc77ac42..17570a9842 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -43,7 +43,7 @@ class Update extends URLUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-url-column.md', + description: '/docs/references/grids/update-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php index b6578777b0..d8b6e39ac6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/list-attributes.md', + description: '/docs/references/grids/list-columns.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php index 1fee8fc840..15aec531e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables') + ->setHttpPath('/v1/databases/:databaseId/grids/tables') ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') @@ -43,7 +43,7 @@ class Create extends CollectionCreate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/create-table.md', + description: '/docs/references/grids/create-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php index ef0478c042..cb2923f572 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -39,7 +39,7 @@ class Delete extends CollectionDelete namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/delete-table.md', + description: '/docs/references/grids/delete-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php similarity index 86% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php index 1cc147f04d..3ac36d27ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/get-table.md', + description: '/docs/references/grids/get-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php index a83bb3dc44..3d9c8709a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') @@ -45,7 +45,7 @@ class Create extends IndexCreate 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/databases/create-index.md', + description: '/docs/references/grids/create-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php index a1d2fd5fce..a2c23ea60b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'tables.write') @@ -44,7 +44,7 @@ class Delete extends IndexDelete 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/databases/delete-index.md', + description: '/docs/references/grids/delete-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php index cb8ef92a80..f2c7cbcb94 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/get-index.md', + description: '/docs/references/grids/get-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php index 78b2c8874f..4ec7da0a41 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/list-indexes.md', + description: '/docs/references/grids/list-indexes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php similarity index 84% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php index 63c53cf2bd..1c24a23175 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -32,8 +32,8 @@ class XList extends CollectionLogXList ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/get-table-logs.md', + name: self::getName(), + description: '/docs/references/grids/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index 30aad96db8..4837d30e46 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') @@ -43,7 +43,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-rows.md', + description: '/docs/references/grids/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index 4a862b1807..c72d82d65d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') @@ -44,7 +44,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-rows.md', + description: '/docs/references/grids/update-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php index db87daed89..b85ee87782 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') @@ -44,7 +44,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-rows.md', + description: '/docs/references/grids/upsert-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php index e9eb81aab8..fd642de09e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/decrement') ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].decrement') @@ -44,7 +44,7 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/decrement-row-column.md', + description: '/docs/references/grids/decrement-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php index a30618ea62..b3af9bb1b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/increment') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/increment') ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].increment') @@ -44,7 +44,7 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/increment-row-column.md', + description: '/docs/references/grids/increment-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php index 3fc8a30bfd..56933b882c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) ->label('scope', 'rows.write') @@ -53,7 +53,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-row.md', + description: '/docs/references/grids/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -74,7 +74,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), - description: '/docs/references/databases/create-rows.md', + description: '/docs/references/grids/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php index 36c8aefbc6..b1f93164df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) ->label('scope', 'rows.write') @@ -48,7 +48,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-row.md', + description: '/docs/references/grids/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php index b821d01ebe..1015e01819 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/get-row.md', + description: '/docs/references/grids/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php similarity index 89% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php index b279e96381..4522b3005f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/get-row-logs.md', + description: '/docs/references/grids/get-row-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php index 77cf531a4f..f9b1ce693e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') @@ -45,7 +45,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-row.md', + description: '/docs/references/grids/update-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php index d6207a5c1f..145217e03b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') @@ -46,7 +46,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-row.md', + description: '/docs/references/grids/upsert-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php similarity index 91% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php index 244a4afdb9..d2589e4b63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/list-rows.md', + description: '/docs/references/grids/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php index f5400366fd..bbc82aa52d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') @@ -42,7 +42,7 @@ class Update extends CollectionUpdate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/update-table.md', + description: '/docs/references/grids/update-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php similarity index 83% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php index 9f51a82734..015c2c2592 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) ->label('scope', 'tables.read') @@ -36,8 +36,8 @@ class Get extends CollectionUsageGet ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, - name: 'getUsage', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/get-table-usage.md', + name: self::getName(), + description: '/docs/references/grids/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php index 361ab2020f..fd329ea6aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables') + ->setHttpPath('/v1/databases/:databaseId/grids/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/databases/list-tables.md', + description: '/docs/references/grids/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 4ddadeece6..aad8571553 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -2,52 +2,52 @@ namespace Appwrite\Platform\Modules\Databases\Services\Registry; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean\Create as CreateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean\Update as UpdateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime\Create as CreateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime\Update as UpdateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Delete as DeleteColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email\Create as CreateEmail; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email\Update as UpdateEmail; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum\Create as CreateEnum; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum\Update as UpdateEnum; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float\Create as CreateFloat; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float\Update as UpdateFloat; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Get as GetColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer\Create as CreateInteger; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer\Update as UpdateInteger; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP\Create as CreateIP; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP\Update as UpdateIP; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship\Create as CreateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship\Update as UpdateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String\Create as CreateString; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String\Update as UpdateString; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL\Create as CreateURL; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL\Update as UpdateURL; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\XList as ListColumns; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Create as CreateTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Delete as DeleteTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Get as GetTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Create as CreateColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Delete as DeleteColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Get as GetColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\XList as ListColumnIndexes; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as ListTableLogs; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Delete as DeleteRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Update as UpdateRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Decrement as DecrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Increment as IncrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Get as GetRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs\XList as ListRowLogs; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Update as UpdateRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Upsert as UpsertRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\XList as ListRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Update as UpdateTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage\Get as GetTableUsage; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\XList as ListTables; +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 Utopia\Platform\Service; /** diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 4a5ebd4566..6ab0310e14 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -114,6 +114,7 @@ abstract class Format protected function getEnumName(string $service, string $method, string $param): ?string { + /* `$service` is `$namespace` */ switch ($service) { case 'proxy': switch ($method) { @@ -206,12 +207,14 @@ abstract class Format } } break; - case 'tables': + case 'grids': switch ($method) { - case 'getUsage': + case 'getDatabaseUsage': + case 'listDatabaseUsage': + case 'getTableUsage': switch ($param) { case 'range': - return 'DatabaseUsageRange'; + return 'GridUsageRange'; } break; case 'createRelationshipColumn': @@ -478,16 +481,17 @@ abstract class Format switch ($method) { /*case 'getUsage':*/ case 'listUsage': - case 'getTableUsage': case 'getCollectionUsage': case 'getDatabaseUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; - case 'tables': + case 'grids': switch ($method) { - case 'getUsage': + case 'getDatabaseUsage': + case 'listDatabaseUsage': + 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 96c8317c8f..98c33b8ae0 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -111,11 +111,7 @@ class OpenAPI3 extends Format */ $consumes = [$sdk->getRequestType()->value]; - $method = $sdk->getMethodName() ?? \uniqid(); - - if (!empty($method) && \is_array($method)) { - $method = \array_keys($method)[0]; - } + $methodName = $sdk->getMethodName() ?? \uniqid(); $desc = $sdk->getDescriptionFilePath() ?: $sdk->getDescription(); $produces = ($sdk->getContentType())->value; @@ -149,18 +145,18 @@ class OpenAPI3 extends Format $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $namespace . ucfirst($method), + 'operationId' => $namespace . ucfirst($methodName), 'tags' => [$namespace], 'description' => $descContents, 'responses' => [], 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata - 'method' => $method, + 'method' => $methodName, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), @@ -180,11 +176,11 @@ class OpenAPI3 extends Format if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; - foreach ($additionalMethods as $method) { - /** @var Method $method */ - $desc = $method->getDescriptionFilePath(); + foreach ($additionalMethods as $methodObj) { + /** @var Method $methodObj */ + $desc = $methodObj->getDescriptionFilePath(); - $methodSecurities = $method->getAuth(); + $methodSecurities = $methodObj->getAuth(); $methodSdkPlatforms = []; foreach ($methodSecurities as $value) { switch ($value) { @@ -211,15 +207,15 @@ class OpenAPI3 extends Format } $methodSecurities = ['Project' => []]; - foreach ($method->getAuth() as $security) { - /** @var AuthType $security */ + foreach ($methodObj->getAuth() as $security) { if (\array_key_exists($security->value, $this->keys)) { $methodSecurities[$security->value] = []; } } $additionalMethod = [ - 'name' => $method->getMethodName(), + 'name' => $methodObj->getMethodName(), + 'namespace' => $methodObj->getNamespace(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -227,25 +223,49 @@ class OpenAPI3 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($method->getParameters() as $parameter) { - $additionalMethod['parameters'][] = $parameter->getName(); + // add deprecation only if method has it! + if ($methodObj->getDeprecated() instanceof Deprecated) { + $additionalMethod['deprecated'] = [ + 'since' => $methodObj->getDeprecated()->getSince(), + 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), + ]; + } - if (!$parameter->getOptional()) { - $additionalMethod['required'][] = $parameter->getName(); + // If additional method has no parameters, inherit from route + if (empty($methodObj->getParameters())) { + foreach ($route->getParams() as $name => $param) { + $additionalMethod['parameters'][] = $name; + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } + } + } else { + // Use method's own parameters + foreach ($methodObj->getParameters() as $parameter) { + $additionalMethod['parameters'][] = $parameter->getName(); + if (!$parameter->getOptional()) { + $additionalMethod['required'][] = $parameter->getName(); + } } } - foreach ($method->getResponses() as $response) { + foreach ($methodObj->getResponses() as $response) { if (\is_array($response->getModel())) { $additionalMethod['responses'][] = [ 'code' => $response->getCode(), 'model' => \array_map(fn ($m) => '#/components/schemas/' . $m, $response->getModel()) ]; } else { - $additionalMethod['responses'][] = [ + $responseData = [ 'code' => $response->getCode(), - 'model' => '#/components/schemas/' . $response->getModel() ]; + + // lets not assume stuff here! + if ($response->getCode() !== 204) { + $responseData['model'] = '#/components/schemas/' . $response->getModel(); + } + + $additionalMethod['responses'][] = $responseData; } } @@ -506,13 +526,13 @@ class OpenAPI3 extends Format $node['schema']['type'] = $validator->getType(); $node['schema']['x-example'] = $validator->getList()[0]; - //Iterate from the blackList. If it matches with the current one, then it is a blackList + // Iterate from the blackList. If it matches with the current one, then it is a blackList // Do not add the enum $allowed = true; foreach ($this->enumBlacklist as $blacklist) { if ( $blacklist['namespace'] == $sdk->getNamespace() - && $blacklist['method'] == $method + && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name ) { $allowed = false; @@ -522,8 +542,8 @@ class OpenAPI3 extends Format if ($allowed) { $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $method, $name); - $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $method, $name); + $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); } if ($validator->getType() === 'integer') { $node['format'] = 'int32'; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 9b104637b4..96f7b96f06 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -112,11 +112,7 @@ class Swagger2 extends Format $consumes = [$sdk->getRequestType()->value]; } - $method = $sdk->getMethodName() ?? \uniqid(); - - if (!empty($method) && is_array($method)) { - $method = array_keys($method)[0]; - } + $methodName = $sdk->getMethodName() ?? \uniqid(); $desc = $sdk->getDescriptionFilePath() ?: $sdk->getDescription(); $produces = ($sdk->getContentType())->value; @@ -151,7 +147,7 @@ class Swagger2 extends Format $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $namespace . ucfirst($method), + 'operationId' => $namespace . ucfirst($methodName), 'consumes' => [], 'produces' => [], 'tags' => [$namespace], @@ -159,12 +155,12 @@ class Swagger2 extends Format 'responses' => [], 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata - 'method' => $method, + 'method' => $methodName, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), @@ -188,11 +184,11 @@ class Swagger2 extends Format if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; - foreach ($additionalMethods as $method) { - /** @var Method $method */ - $desc = $method->getDescriptionFilePath(); + foreach ($additionalMethods as $methodObj) { + /** @var Method $methodObj */ + $desc = $methodObj->getDescriptionFilePath(); - $methodSecurities = $method->getAuth(); + $methodSecurities = $methodObj->getAuth(); $methodSdkPlatforms = []; foreach ($methodSecurities as $value) { switch ($value) { @@ -219,7 +215,7 @@ class Swagger2 extends Format } $methodSecurities = ['Project' => []]; - foreach ($method->getAuth() as $security) { + foreach ($methodObj->getAuth() as $security) { /** @var AuthType $security */ if (\array_key_exists($security->value, $this->keys)) { $methodSecurities[$security->value] = []; @@ -227,7 +223,8 @@ class Swagger2 extends Format } $additionalMethod = [ - 'name' => $method->getMethodName(), + 'name' => $methodObj->getMethodName(), + 'namespace' => $methodObj->getNamespace(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -235,15 +232,33 @@ class Swagger2 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($method->getParameters() as $parameter) { - $additionalMethod['parameters'][] = $parameter->getName(); + // add deprecation only if method has it! + if ($methodObj->getDeprecated() instanceof Deprecated) { + $additionalMethod['deprecated'] = [ + 'since' => $methodObj->getDeprecated()->getSince(), + 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), + ]; + } - if (!$parameter->getOptional()) { - $additionalMethod['required'][] = $parameter->getName(); + // If additional method has no parameters, inherit from route + if (empty($methodObj->getParameters())) { + foreach ($route->getParams() as $name => $param) { + $additionalMethod['parameters'][] = $name; + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } + } + } else { + // Use method's own parameters + foreach ($methodObj->getParameters() as $parameter) { + $additionalMethod['parameters'][] = $parameter->getName(); + if (!$parameter->getOptional()) { + $additionalMethod['required'][] = $parameter->getName(); + } } } - foreach ($method->getResponses() as $response) { + foreach ($methodObj->getResponses() as $response) { /** @var Response $response */ if (\is_array($response->getModel())) { $additionalMethod['responses'][] = [ @@ -251,10 +266,16 @@ class Swagger2 extends Format 'model' => \array_map(fn ($m) => '#/definitions/' . $m, $response->getModel()) ]; } else { - $additionalMethod['responses'][] = [ + $responseData = [ 'code' => $response->getCode(), - 'model' => '#/definitions/' . $response->getModel() ]; + + // lets not assume stuff here! + if ($response->getCode() !== 204) { + $responseData['model'] = '#/definitions/' . $response->getModel(); + } + + $additionalMethod['responses'][] = $responseData; } } @@ -517,10 +538,10 @@ class Swagger2 extends Format $node['type'] = $validator->getType(); $node['x-example'] = $validator->getList()[0]; - //Iterate the blackList. If it matches with the current one, then it is blackListed + // Iterate the blackList. If it matches with the current one, then it is blackListed $allowed = true; foreach ($this->enumBlacklist as $blacklist) { - if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $method && $blacklist['parameter'] == $name) { + if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) { $allowed = false; break; } @@ -528,8 +549,8 @@ class Swagger2 extends Format if ($allowed && $validator->getType() === 'string') { $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getEnumName($namespace, $method, $name); - $node['x-enum-keys'] = $this->getEnumKeys($namespace, $method, $name); + $node['x-enum-name'] = $this->getEnumName($namespace, $methodName, $name); + $node['x-enum-keys'] = $this->getEnumKeys($namespace, $methodName, $name); } if ($validator->getType() === 'integer') { diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index b5800eac37..090f1faec7 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 . '/tables', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns' . '/string', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $rowId, + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/usage?range=30d', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/usage?range=30d', $this->getConsoleHeaders() ); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php similarity index 90% rename from tests/e2e/Services/Databases/Tables/DatabasesBase.php rename to tests/e2e/Services/Databases/Grids/DatabasesBase.php index 58de6754ef..882d73f63f 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -61,7 +61,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 . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -97,7 +97,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/tables/' . $data['moviesId'] . '/rows', + '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -110,7 +110,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/tables/' . $data['moviesId'] . '/rows', + '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', // 'x-appwrite-project' => '', empty header @@ -129,7 +129,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -143,7 +143,7 @@ trait DatabasesBase $this->assertFalse($response['body']['enabled']); if ($this->getSide() === 'client') { - $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -160,14 +160,14 @@ trait DatabasesBase $this->assertEquals(404, $responseCreateDocument['headers']['status-code']); - $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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']); - $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ + $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -175,7 +175,7 @@ trait DatabasesBase $this->assertEquals(404, $responseGetDocument['headers']['status-code']); } - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -196,7 +196,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -206,7 +206,7 @@ trait DatabasesBase 'required' => true, ]); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -217,7 +217,7 @@ trait DatabasesBase 'default' => '', ]); - $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -228,7 +228,7 @@ trait DatabasesBase 'default' => '', ]); - $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -239,7 +239,7 @@ trait DatabasesBase 'max' => 2200, ]); - $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -249,7 +249,7 @@ trait DatabasesBase 'min' => 60, ]); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -260,7 +260,7 @@ trait DatabasesBase 'array' => true, ]); - $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ + $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -269,7 +269,7 @@ trait DatabasesBase 'required' => false, ]); - $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ + $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -281,7 +281,7 @@ trait DatabasesBase 'twoWayKey' => 'movie' ]); - $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -353,7 +353,7 @@ trait DatabasesBase // wait for database worker to create attributes sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -380,7 +380,7 @@ trait DatabasesBase public function testListColumns(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -393,7 +393,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 . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -411,7 +411,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -427,7 +427,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.'/tables/'.$table['body']['$id'].'/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -441,7 +441,7 @@ trait DatabasesBase sleep(1); - $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -457,7 +457,7 @@ trait DatabasesBase /** * Update attribute size to exceed Index maximum length */ - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/grids/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'], @@ -482,7 +482,7 @@ trait DatabasesBase 'name' => 'Test Database 2' ]); - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -496,7 +496,7 @@ trait DatabasesBase ]); // Create enum attribute - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -514,7 +514,7 @@ trait DatabasesBase \sleep(2); // Update enum attribute - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/grids/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'], @@ -534,7 +534,7 @@ trait DatabasesBase public function testColumnResponseModels(array $data): array { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -550,7 +550,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $columnsPath = "/databases/" . $databaseId . "/tables/{$tableId}/columns"; + $columnsPath = "/databases/" . $databaseId . "/grids/tables/{$tableId}/columns"; $string = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -951,7 +951,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 . '/tables/' . $tableId . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1063,7 +1063,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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1178,7 +1178,7 @@ trait DatabasesBase /** * Test for FAILURE */ - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1202,7 +1202,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1218,7 +1218,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1234,7 +1234,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1252,7 +1252,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1269,7 +1269,7 @@ trait DatabasesBase $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); // Test for failure - $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1282,7 +1282,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $noAttributes = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1295,7 +1295,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $duplicates = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1308,7 +1308,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $tooLong = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1321,7 +1321,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1334,7 +1334,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1347,7 +1347,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $actorsArray['headers']['status-code']); - $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1361,7 +1361,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); - $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1374,7 +1374,7 @@ 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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1388,7 +1388,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index1['headers']['status-code']); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1406,7 +1406,7 @@ trait DatabasesBase */ sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1434,7 +1434,7 @@ trait DatabasesBase $tableId = $data['moviesId']; // Test case for valid lengths - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1447,7 +1447,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}/tables/{$tableId}/indexes/lengthTestIndex", [ + $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes/lengthTestIndex", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1457,7 +1457,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}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1470,7 +1470,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}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1484,7 +1484,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}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1503,7 +1503,7 @@ trait DatabasesBase public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1515,7 +1515,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 . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1534,7 +1534,7 @@ trait DatabasesBase public function testCreateRow(array $data): array { $databaseId = $data['databaseId']; - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1555,7 +1555,7 @@ trait DatabasesBase ] ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1578,7 +1578,7 @@ trait DatabasesBase ] ]); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1601,7 +1601,7 @@ trait DatabasesBase ] ]); - $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1672,7 +1672,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $rowId = ID::unique(); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1689,14 +1689,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 . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1714,7 +1714,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 . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1722,7 +1722,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 . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1735,7 +1735,7 @@ trait DatabasesBase ], ]); // shouldn't be able to read as no read permission - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 break; } // shouldn't be able to delete as no delete permission - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1758,7 +1758,7 @@ trait DatabasesBase $this->assertEquals(401, $row['headers']['status-code']); } // giving the delete permission - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1773,14 +1773,14 @@ trait DatabasesBase ], ]); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1798,7 +1798,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1816,7 +1816,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1828,7 +1828,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1842,7 +1842,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1858,7 +1858,7 @@ trait DatabasesBase // upserting values $rowId = ID::unique(); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1881,7 +1881,7 @@ trait DatabasesBase ]); $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1895,7 +1895,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1919,7 +1919,7 @@ trait DatabasesBase // data should get updated $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1933,7 +1933,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 . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1957,7 +1957,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1969,7 +1969,7 @@ trait DatabasesBase $this->assertEquals(2, $rows['body']['total']); // test without passing permissions - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1982,7 +1982,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 . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1990,7 +1990,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2159,7 +2159,7 @@ trait DatabasesBase public function testListRows(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2183,7 +2183,7 @@ trait DatabasesBase $this->assertEquals($data['moviesId'], $row['$tableId']); } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2199,7 +2199,7 @@ trait DatabasesBase $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 . '/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ + $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2209,7 +2209,7 @@ trait DatabasesBase ]); // creating a dummy doc with null description - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2226,7 +2226,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rowsPaginated = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2239,7 +2239,7 @@ trait DatabasesBase $this->assertEquals(400, $rowsPaginated['headers']['status-code']); // deleting the dummy doc created - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2253,7 +2253,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; foreach ($data['rows'] as $row) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2280,7 +2280,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; $row = $data['rows'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2304,7 +2304,7 @@ trait DatabasesBase /** * Test after without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2315,7 +2315,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2329,7 +2329,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2344,7 +2344,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2359,7 +2359,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2376,7 +2376,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2391,7 +2391,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2408,7 +2408,7 @@ trait DatabasesBase /** * Test after with unknown row. */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2423,7 +2423,7 @@ trait DatabasesBase * Test null value for cursor */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2446,7 +2446,7 @@ trait DatabasesBase /** * Test before without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2457,7 +2457,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2471,7 +2471,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2486,7 +2486,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2501,7 +2501,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2518,7 +2518,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2533,7 +2533,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2556,7 +2556,7 @@ trait DatabasesBase public function testListRowsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2570,7 +2570,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2595,7 +2595,7 @@ trait DatabasesBase public function testRowsListQueries(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2608,7 +2608,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2621,7 +2621,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2634,7 +2634,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2648,7 +2648,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2660,7 +2660,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2672,7 +2672,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2684,7 +2684,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2697,7 +2697,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2708,7 +2708,7 @@ trait DatabasesBase $this->assertCount(3, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2719,7 +2719,7 @@ trait DatabasesBase $this->assertCount(0, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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(200, $rows['headers']['status-code']); $this->assertEquals(3, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2743,7 +2743,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2755,7 +2755,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2769,7 +2769,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2790,7 +2790,7 @@ trait DatabasesBase $conditions[] = $i; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2807,7 +2807,7 @@ trait DatabasesBase $value .= "[" . $i . "] Too long title to cross 2k chars query limit "; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2820,7 +2820,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + // $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ // 'content-type' => 'application/json', // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders()), [ @@ -2840,7 +2840,7 @@ trait DatabasesBase public function testUpdateRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2874,7 +2874,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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2899,7 +2899,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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2913,7 +2913,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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::now()), @@ -2929,7 +2929,7 @@ trait DatabasesBase * Test for failure */ - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => 'invalid', @@ -2943,7 +2943,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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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)), @@ -2966,7 +2966,7 @@ trait DatabasesBase public function testDeleteRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2988,21 +2988,21 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3026,7 +3026,7 @@ trait DatabasesBase $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3045,7 +3045,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3054,7 +3054,7 @@ trait DatabasesBase 'required' => false, ]); - $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3064,7 +3064,7 @@ trait DatabasesBase 'required' => false, ]); - $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3073,7 +3073,7 @@ trait DatabasesBase 'required' => false, ]); - $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3083,7 +3083,7 @@ trait DatabasesBase 'required' => false, ]); - $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3095,7 +3095,7 @@ trait DatabasesBase ]); // TODO@kodumbeats min and max are rounded in error message - $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3106,7 +3106,7 @@ trait DatabasesBase 'max' => 1.4, ]); - $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3118,7 +3118,7 @@ trait DatabasesBase 'max' => 1, ]); - $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 'max' => 10, ]); - $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3142,7 +3142,7 @@ trait DatabasesBase * Test for failure */ - $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3152,7 +3152,7 @@ trait DatabasesBase 'max' => 3, ]); - $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3162,7 +3162,7 @@ trait DatabasesBase 'array' => true, ]); - $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3172,7 +3172,7 @@ trait DatabasesBase 'default' => 12 ]); - $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3182,7 +3182,7 @@ trait DatabasesBase 'default' => 'south' ]); - $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3192,7 +3192,7 @@ trait DatabasesBase 'default' => 'NORTH' ]); - $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3202,7 +3202,7 @@ trait DatabasesBase 'default' => null ]); - $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3234,7 +3234,7 @@ trait DatabasesBase // wait for worker to add attributes sleep(3); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -3246,7 +3246,7 @@ trait DatabasesBase * Test for successful validation */ - $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3261,7 +3261,7 @@ trait DatabasesBase ] ]); - $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3276,7 +3276,7 @@ trait DatabasesBase ] ]); - $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3291,7 +3291,7 @@ trait DatabasesBase ] ]); - $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3306,7 +3306,7 @@ trait DatabasesBase ] ]); - $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3321,7 +3321,7 @@ trait DatabasesBase ] ]); - $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3336,7 +3336,7 @@ trait DatabasesBase ] ]); - $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3351,7 +3351,7 @@ trait DatabasesBase ] ]); - $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3366,7 +3366,7 @@ trait DatabasesBase ] ]); - $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3395,7 +3395,7 @@ trait DatabasesBase * Test that custom validators reject documents */ - $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3410,7 +3410,7 @@ trait DatabasesBase ] ]); - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3425,7 +3425,7 @@ trait DatabasesBase ] ]); - $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3440,7 +3440,7 @@ trait DatabasesBase ] ]); - $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3455,7 +3455,7 @@ trait DatabasesBase ] ]); - $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3470,7 +3470,7 @@ trait DatabasesBase ] ]); - $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3485,7 +3485,7 @@ trait DatabasesBase ] ]); - $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3500,7 +3500,7 @@ trait DatabasesBase ] ]); - $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3515,7 +3515,7 @@ trait DatabasesBase ] ]); - $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3530,7 +3530,7 @@ trait DatabasesBase ] ]); - $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3571,7 +3571,7 @@ trait DatabasesBase public function testDefaultPermissions(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3604,7 +3604,7 @@ trait DatabasesBase // Updated Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3632,7 +3632,7 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])), ], $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3649,7 +3649,7 @@ trait DatabasesBase // Reset Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3668,7 +3668,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 . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3700,7 +3700,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3724,7 +3724,7 @@ trait DatabasesBase sleep(2); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3740,7 +3740,7 @@ trait DatabasesBase // wait for db to add attribute sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3756,7 +3756,7 @@ trait DatabasesBase // wait for db to add attribute sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3773,7 +3773,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3789,7 +3789,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3806,7 +3806,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3815,7 +3815,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3846,7 +3846,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3856,7 +3856,7 @@ trait DatabasesBase // Current user has no table permissions but has read permission for this row $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); - $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ + $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3866,7 +3866,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 . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3893,7 +3893,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3914,7 +3914,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3929,7 +3929,7 @@ trait DatabasesBase \sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3944,7 +3944,7 @@ trait DatabasesBase \sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3961,7 +3961,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3977,7 +3977,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3994,7 +3994,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4003,7 +4003,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4034,7 +4034,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4044,7 +4044,7 @@ trait DatabasesBase // other2 has no table permissions and row permissions are disabled $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4055,7 +4055,7 @@ trait DatabasesBase $this->assertEquals(401, $rowsUser2['headers']['status-code']); // Enable row permissions - $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, [ + $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4064,7 +4064,7 @@ trait DatabasesBase 'rowSecurity' => true, ]); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4082,7 +4082,7 @@ trait DatabasesBase public function testUniqueIndexDuplicate(array $data): array { $databaseId = $data['databaseId']; - $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4097,7 @@ trait DatabasesBase sleep(2); // test for failure - $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4120,7 +4120,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 . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4143,7 +4143,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 . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ + $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4182,7 +4182,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows', $headers, [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows', $headers, [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', @@ -4198,7 +4198,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Updated Date Test', ] @@ -4212,7 +4212,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', '$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable @@ -4246,7 +4246,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create table - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4268,7 +4268,7 @@ trait DatabasesBase $moviesId = $movies['body']['$id']; // create attribute - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4284,7 +4284,7 @@ trait DatabasesBase sleep(2); // add row - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4308,7 +4308,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 . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4321,7 +4321,7 @@ trait DatabasesBase $this->assertCount(1, $row['body']['$permissions']); // Send only mutation permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4339,7 +4339,7 @@ trait DatabasesBase } // remove table - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $moviesId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $moviesId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4357,7 +4357,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4370,7 +4370,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4382,7 +4382,7 @@ trait DatabasesBase $this->assertEquals(202, $true['headers']['status-code']); - $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4402,7 +4402,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4420,7 +4420,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4437,7 +4437,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4449,7 +4449,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4463,7 +4463,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4481,7 +4481,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relation['body']['type']); $this->assertEquals('processing', $relation['body']['status']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4496,7 +4496,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}/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4513,7 +4513,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 . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4537,7 +4537,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); // Create without nested ID - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4568,7 +4568,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$internalId', $person1['body']); $this->assertArrayNotHasKey('$internalId', $person1['body']['library']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4582,7 +4582,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 . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4594,7 +4594,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 . '/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4604,7 +4604,7 @@ trait DatabasesBase $this->assertEquals(204, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4612,7 +4612,7 @@ trait DatabasesBase $this->assertEquals(404, $attribute['headers']['status-code']); - $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ + $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4620,7 +4620,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('library', $person1['body']); //Test Deletion of related twoKey - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4647,7 +4647,7 @@ trait DatabasesBase $libraryCollection = $data['libraryCollection']; // One person can own several libraries - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $personCollection . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4661,7 +4661,7 @@ trait DatabasesBase sleep(1); - $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/columns', array_merge([ + $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4671,7 +4671,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 . '/tables/' . $libraryCollection, array_merge([ + $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4680,7 +4680,7 @@ trait DatabasesBase $this->assertIsArray($libraryCollectionResponse['body']['columns']); $this->assertCount(2, $libraryCollectionResponse['body']['columns']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4697,7 +4697,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 . '/tables/' . $personCollection . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4736,7 +4736,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $person2['body']); $this->assertEquals(2, count($person2['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4750,7 +4750,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $response['body']); $this->assertEquals(2, count($response['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/rows/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4763,7 +4763,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 . '/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4773,7 +4773,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4800,7 +4800,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create album table - $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4815,7 +4815,7 @@ trait DatabasesBase ]); // Create album name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4826,7 +4826,7 @@ trait DatabasesBase ]); // Create artist table - $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4841,7 +4841,7 @@ trait DatabasesBase ]); // Create artist name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4852,7 +4852,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4882,7 +4882,7 @@ trait DatabasesBase ]; // Create album - $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows', array_merge([ + $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4904,7 +4904,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 . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ + $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4920,7 +4920,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 . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ + $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4952,7 +4952,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create sports table - $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4967,7 +4967,7 @@ trait DatabasesBase ]); // Create sport name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4978,7 +4978,7 @@ trait DatabasesBase ]); // Create player table - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4993,7 +4993,7 @@ trait DatabasesBase ]); // Create player name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5004,7 +5004,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5035,7 +5035,7 @@ trait DatabasesBase ]; // Create sport - $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows', array_merge([ + $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5065,7 +5065,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 . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ + $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5083,7 +5083,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 . '/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ + $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5112,7 +5112,7 @@ trait DatabasesBase */ public function testValidateOperators(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5131,7 +5131,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'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5155,7 +5155,7 @@ trait DatabasesBase */ public function testSelectQueries(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5170,7 +5170,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'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5184,7 +5184,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $row); $this->assertArrayNotHasKey('$tableId', $row); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5221,7 +5221,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5238,7 +5238,7 @@ trait DatabasesBase $this->assertEquals($presidents['body']['name'], 'USA Presidents'); // Create Attributes - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5249,7 +5249,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $firstName['headers']['status-code']); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5264,7 +5264,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5279,7 +5279,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5294,7 +5294,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5312,7 +5312,7 @@ trait DatabasesBase $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5344,7 +5344,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5358,7 +5358,7 @@ trait DatabasesBase ], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5375,7 +5375,7 @@ trait DatabasesBase $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5385,7 +5385,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5395,7 +5395,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5408,7 +5408,7 @@ trait DatabasesBase sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -5423,7 +5423,7 @@ trait DatabasesBase ], ]); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -5440,7 +5440,7 @@ trait DatabasesBase */ public function testTimeout(array $data): void { - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5460,7 +5460,7 @@ trait DatabasesBase 'databaseId' => $table['body']['databaseId'] ]; - $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/columns/string', array_merge([ + $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5474,7 +5474,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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5490,7 +5490,7 @@ trait DatabasesBase ]); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timeout' => 1, @@ -5518,7 +5518,7 @@ trait DatabasesBase ]); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5534,7 +5534,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5546,7 +5546,7 @@ trait DatabasesBase \sleep(3); // Create row with initial count = 5 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5564,7 +5564,7 @@ trait DatabasesBase $docId = $doc['body']['$id']; // Increment by default 1 - $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -5572,14 +5572,14 @@ trait DatabasesBase $this->assertEquals(6, $inc['body']['count']); // Verify count = 6 - $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$docId", 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/tables/$tableId/rows/$docId/count/increment", array_merge([ + $inc2 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -5588,21 +5588,21 @@ trait DatabasesBase $this->assertEquals(200, $inc2['headers']['status-code']); $this->assertEquals(10, $inc2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$docId", 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/tables/$tableId/rows/$docId/count/increment", array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/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/tables/$tableId/rows/$docId/unknown/increment", array_merge([ + $notFound = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/unknown/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -5622,7 +5622,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5639,7 +5639,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5651,7 +5651,7 @@ trait DatabasesBase \sleep(2); // Create row with initial count = 10 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5666,21 +5666,21 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Decrement by default 1 (count = 10 -> 9) - $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -5689,21 +5689,21 @@ trait DatabasesBase $this->assertEquals(200, $dec2['headers']['status-code']); $this->assertEquals(6, $dec2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['value' => 'not-a-number']); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php similarity index 91% rename from tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php index 8a8d8de170..32fe49b6fa 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', 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 . '/tables', array_merge([ + $tvShows = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $movies['body']['$id'], array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tvShowsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tvShowsId, 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 . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/randomCollectionId/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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/Tables/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php similarity index 89% rename from tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php index 6893588934..e75039b22e 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -133,7 +133,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; // Create collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -146,7 +146,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); // Add attribute to collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -161,7 +161,7 @@ class DatabasesCustomClientTest extends Scope sleep(2); // Creating document by server, give read permission to our user + some other user - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -182,7 +182,7 @@ class DatabasesCustomClientTest extends Scope // Update document // 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 . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -194,7 +194,7 @@ 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 . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -203,7 +203,7 @@ class DatabasesCustomClientTest extends Scope // Cleanup to prevent collision with other tests // Delete collection - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -216,7 +216,7 @@ class DatabasesCustomClientTest extends Scope sleep(2); // Make sure collection has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -242,7 +242,7 @@ class DatabasesCustomClientTest extends Scope // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -259,7 +259,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -278,7 +278,7 @@ 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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -294,7 +294,7 @@ class DatabasesCustomClientTest extends Scope \sleep(3); // Update relation from collection 2 to on delete restrict - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ + $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'], [ + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'], [ '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 . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -456,7 +456,7 @@ class DatabasesCustomClientTest extends Scope $this->assertArrayHasKey('twoWayKey', $relation['body']); // Second RelationshipManyToMany on Same collections - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -490,7 +490,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -506,7 +506,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -519,7 +519,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -534,7 +534,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -547,7 +547,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -563,7 +563,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 1 to colletion 2 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -576,7 +576,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 2 to colletion 3 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -589,7 +589,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 3 to colletion 4 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -602,7 +602,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 4 to colletion 5 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -676,7 +676,7 @@ 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 . '/tables/' . $table1['body']['$id'] . '/rows', array_merge([ + $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -705,7 +705,7 @@ 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 . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -734,7 +734,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals($parentDocument['body'], $response['body']); // Giving update permission of collection 3 to user. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection3', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -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 . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -780,7 +780,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(11, $response['body'][$table2['body']['$id']]['collection3']['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 . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -797,7 +797,7 @@ 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 . '/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -809,7 +809,7 @@ 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 . '/tables/collection3', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -825,7 +825,7 @@ class DatabasesCustomClientTest extends Scope ]); // Giving update permission to collection 2. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection2', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -842,7 +842,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 3 new document - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -856,7 +856,7 @@ 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 . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -873,7 +873,7 @@ class DatabasesCustomClientTest extends Scope // 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 . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php similarity index 87% rename from tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php index 99f1b58c01..ba137a0b74 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/columns'; + $columnsPath = '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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'] @@ -762,7 +762,7 @@ class DatabasesCustomServerTest extends Scope */ // Create table - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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'] @@ -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 . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, 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 . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1 . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns', 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 . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $tooWide = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', 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 . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/indexes', array_merge([ + $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, 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 . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ + $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/i_dont_exist/grids/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 . '/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $doc1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3625,7 +3625,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ '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 . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ '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 . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4389,7 +4389,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4679,7 +4679,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4872,7 +4872,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/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 . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php similarity index 85% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php index f404cc1bd5..c0c3cdae0b 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php @@ -1,6 +1,6 @@ assertEquals('InvalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', $this->getServerHeader(), [ + $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTableId . '/rows', [ + $publicRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ + $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTableId . '/rows', [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $privateTableId . '/rows', [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -174,7 +174,7 @@ 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 . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -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 . '/tables', $this->getServerHeader(), [ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $moviesId . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php similarity index 89% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php index f1e5c35482..397f82db41 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $public = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', $this->getServerHeader(), [ + $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables', $this->getServerHeader(), [ + $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['public'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['private'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $tables['doconly'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['doconly'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php similarity index 98% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php index a2bc227c8f..0ab3f83ef1 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php @@ -1,6 +1,6 @@ assertEquals(201, $db['headers']['status-code']); - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/grids/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 . '/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 554f84e616..8b6f85a1b1 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -21,7 +21,14 @@ trait Base public static string $UPDATE_COLLECTION = 'update_collection'; public static string $DELETE_COLLECTION = 'delete_collection'; - // Tables + // 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'; + + // Grid tables public static string $CREATE_TABLE = 'create_table'; public static string $GET_TABLE = 'get_table'; public static string $GET_TABLES = 'list_tables'; @@ -55,7 +62,7 @@ trait Base public static string $GET_ATTRIBUTE = 'get_attribute'; public static string $DELETE_ATTRIBUTE = 'delete_attribute'; - // Columns + // 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'; @@ -88,7 +95,7 @@ trait Base public static string $GET_INDEX = 'get_attribute_index'; public static string $DELETE_INDEX = 'delete_attribute_index'; - // Column Indexes + // 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'; @@ -102,13 +109,13 @@ trait Base public static string $UPSERT_DOCUMENT = 'upsert_document'; public static string $DELETE_DOCUMENT = 'delete_document'; - // Documents Bulk APIs + // 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'; - // Rows + // Grid rows public static string $CREATE_ROW = 'create_row_rest'; public static string $GET_ROWS = 'list_rows'; public static string $GET_ROW = 'get_row'; @@ -116,7 +123,7 @@ trait Base public static string $UPSERT_ROW = 'upsert_row'; public static string $DELETE_ROW = 'delete_row'; - // Rows Bulk APIs + // 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'; @@ -534,6 +541,43 @@ trait Base status } }'; + case self::$GRIDS_CREATE_DATABASE: + return 'mutation gridsCreateDatabase($databaseId: String!, $name: String!) { + gridsCreateDatabase(databaseId: $databaseId, name: $name) { + _id + name + } + }'; + case self::$GRIDS_GET_DATABASES: + return 'query gridsListDatabases { + gridsListDatabases { + total + databases { + _id + name + } + } + }'; + case self::$GRIDS_GET_DATABASE: + return 'query gridsGetDatabase($databaseId: String!) { + gridsGetDatabase(databaseId: $databaseId) { + _id + name + } + }'; + case self::$GRIDS_UPDATE_DATABASE: + return 'mutation gridsUpdateDatabase($databaseId: String!, $name: String!) { + gridsUpdateDatabase(databaseId: $databaseId, name: $name) { + _id + name + } + }'; + case self::$GRIDS_DELETE_DATABASE: + return 'mutation gridsDeleteDatabase($databaseId: String!) { + gridsDeleteDatabase(databaseId: $databaseId) { + status + } + }'; case self::$GET_COLLECTION: return 'query getCollection($databaseId: String!, $collectionId: String!) { databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { @@ -580,8 +624,8 @@ trait Base } }'; case self::$GET_TABLE: - return 'query tablesGet($databaseId: String!, $tableId: String!) { - tablesGet(databaseId: $databaseId, tableId: $tableId) { + return 'query gridsGetTable($databaseId: String!, $tableId: String!) { + gridsGetTable(databaseId: $databaseId, tableId: $tableId) { _id _permissions rowSecurity @@ -589,8 +633,8 @@ trait Base } }'; case self::$GET_TABLES: - return 'query tablesList($databaseId: String!) { - tablesList(databaseId: $databaseId) { + return 'query gridsListTables($databaseId: String!) { + gridsListTables(databaseId: $databaseId) { total tables { _id @@ -601,8 +645,8 @@ trait Base } }'; case self::$CREATE_TABLE: - return 'mutation tablesCreate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { - tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + return 'mutation gridsCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + gridsCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { _id _permissions rowSecurity @@ -610,8 +654,8 @@ trait Base } }'; case self::$UPDATE_TABLE: - return 'mutation tablesUpdate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { - tablesUpdate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { + 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) { _id _permissions rowSecurity @@ -619,8 +663,8 @@ trait Base } }'; case self::$DELETE_TABLE: - return 'mutation tablesDelete($databaseId: String!, $tableId: String!) { - tablesDelete(databaseId: $databaseId, tableId: $tableId) { + return 'mutation gridsDeleteTable($databaseId: String!, $tableId: String!) { + gridsDeleteTable(databaseId: $databaseId, tableId: $tableId) { status } }'; @@ -802,7 +846,7 @@ trait Base }'; case self::$CREATE_STRING_COLUMN: return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default @@ -811,7 +855,7 @@ trait Base }'; case self::$CREATE_INTEGER_COLUMN: return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -822,7 +866,7 @@ trait Base }'; case self::$CREATE_FLOAT_COLUMN: return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - tablesCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + gridsCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -833,7 +877,7 @@ trait Base }'; case self::$CREATE_BOOLEAN_COLUMN: return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -842,7 +886,7 @@ trait Base }'; case self::$CREATE_URL_COLUMN: return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -851,7 +895,7 @@ trait Base }'; case self::$CREATE_EMAIL_COLUMN: return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -860,7 +904,7 @@ trait Base }'; case self::$CREATE_IP_COLUMN: return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -869,7 +913,7 @@ trait Base }'; case self::$CREATE_ENUM_COLUMN: return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + gridsCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -879,7 +923,7 @@ trait Base }'; case self::$CREATE_DATETIME_COLUMN: return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -888,7 +932,7 @@ trait Base }'; case self::$CREATE_RELATIONSHIP_COLUMN: return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - tablesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + gridsCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedTable relationType twoWay @@ -899,14 +943,14 @@ trait Base }'; case self::$UPDATE_STRING_COLUMN: return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_INTEGER_COLUMN: return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - tablesUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + gridsUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max @@ -915,7 +959,7 @@ trait Base }'; case self::$UPDATE_FLOAT_COLUMN: return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - tablesUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + gridsUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max @@ -924,35 +968,35 @@ trait Base }'; case self::$UPDATE_BOOLEAN_COLUMN: return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - tablesUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_URL_COLUMN: return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_EMAIL_COLUMN: return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_IP_COLUMN: return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_ENUM_COLUMN: return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - tablesUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + gridsUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { elements required default @@ -960,14 +1004,14 @@ trait Base }'; case self::$UPDATE_DATETIME_COLUMN: return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_RELATIONSHIP_COLUMN: return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ - tablesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { + gridsUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { relatedTable relationType twoWay @@ -1011,7 +1055,7 @@ trait Base }'; case self::$CREATE_COLUMN_INDEX: return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ - tablesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { + gridsCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status @@ -1019,7 +1063,7 @@ trait Base }'; case self::$GET_COLUMN_INDEXES: return 'query listIndexes($databaseId: String!, $tableId: String!) { - tablesListIndexes(databaseId: $databaseId, tableId: $tableId) { + gridsListIndexes(databaseId: $databaseId, tableId: $tableId) { total indexes { key @@ -1030,7 +1074,7 @@ trait Base }'; case self::$GET_COLUMN_INDEX: return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { - tablesGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { key type status @@ -1038,7 +1082,7 @@ trait Base }'; case self::$DELETE_COLUMN_INDEX: return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { - tablesDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; @@ -1065,7 +1109,7 @@ trait Base }'; case self::$GET_COLUMNS: return 'query listColumns($databaseId: String!, $tableId: String!) { - tablesListColumns(databaseId: $databaseId, tableId: $tableId) { + gridsListColumns(databaseId: $databaseId, tableId: $tableId) { total columns { ...columnProperties @@ -1074,13 +1118,13 @@ trait Base }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$GET_COLUMN: return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { - tablesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { ...columnProperties } }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$DELETE_COLUMN: return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { - tablesDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; @@ -1127,7 +1171,7 @@ trait Base }'; case self::$CREATE_ROWS: return 'mutation createRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - tablesCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + gridsCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { rows { _id _tableId @@ -1138,7 +1182,7 @@ trait Base }'; case self::$GET_ROW: return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { - tablesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + gridsGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id _tableId _permissions @@ -1147,7 +1191,7 @@ trait Base }'; case self::$GET_ROWS: return 'query listRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - tablesListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + gridsListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1160,7 +1204,7 @@ trait Base }'; case self::$CREATE_ROW: return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - tablesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId _permissions @@ -1288,7 +1332,7 @@ trait Base }'; case self::$UPDATE_ROW: return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - tablesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId data @@ -1296,7 +1340,7 @@ trait Base }'; case self::$UPSERT_ROW: return 'mutation upsertRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!] = []) { - tablesUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _databaseId _tableId @@ -1305,13 +1349,13 @@ trait Base }'; case self::$DELETE_ROW: return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { - tablesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + gridsDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; case self::$UPDATE_ROWS: return 'mutation updateRows($databaseId: String!, $tableId: String!, $data: Json!, $queries: [String!]) { - tablesUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { + gridsUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { total rows { _id @@ -1324,7 +1368,7 @@ trait Base }'; case self::$UPSERT_ROWS: return 'mutation upsertRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - tablesUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + gridsUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { total rows { _id @@ -1337,7 +1381,7 @@ trait Base }'; case self::$DELETE_ROWS: return 'mutation deleteRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - tablesDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + gridsDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -3070,7 +3114,7 @@ trait Base _id name } - tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + gridsCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { _id _createdAt _updatedAt @@ -3087,7 +3131,7 @@ trait Base status } } - tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { key type status @@ -3096,7 +3140,7 @@ trait Base default array } - tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { key type status @@ -3106,7 +3150,7 @@ trait Base default array } - tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { key type status diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php similarity index 98% rename from tests/e2e/Services/GraphQL/Tables/AbuseTest.php rename to tests/e2e/Services/GraphQL/Grids/AbuseTest.php index 88c216dd5a..1a388871bf 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php @@ -1,6 +1,6 @@ $this->getProject()['apiKey'], ], $gqlPayload); - $tableId = $response['body']['data']['tablesCreate']['_id']; + $tableId = $response['body']['data']['gridsCreateTable']['_id']; $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ diff --git a/tests/e2e/Services/GraphQL/Tables/AuthTest.php b/tests/e2e/Services/GraphQL/Grids/AuthTest.php similarity index 92% rename from tests/e2e/Services/GraphQL/Tables/AuthTest.php rename to tests/e2e/Services/GraphQL/Grids/AuthTest.php index 21d581d207..fc6b76818c 100644 --- a/tests/e2e/Services/GraphQL/Tables/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AuthTest.php @@ -1,6 +1,6 @@ $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -154,7 +154,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -178,8 +178,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], - 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'rowId' => $row['body']['data']['gridsCreateRow']['_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']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); $this->assertArrayNotHasKey('errors', $row['body']); // Try to read as account 2 @@ -213,7 +213,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -237,8 +237,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], - 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php similarity index 92% rename from tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php rename to tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php index 5ff8e65922..8095692b92 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_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']['databasesCreate']; + $database = $database['body']['data']['gridsCreateDatabase']; $this->assertEquals('Actors', $database['name']); return $database; @@ -75,7 +75,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['tablesCreate']; + $table = $table['body']['data']['gridsCreateTable']; $this->assertEquals('Actors', $table['name']); return [ @@ -110,7 +110,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); return $data; } @@ -142,7 +142,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); return $data; } @@ -183,7 +183,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesCreateRow']; + $row = $row['body']['data']['gridsCreateRow']; $this->assertIsArray($row); return [ @@ -216,7 +216,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['tablesListRows']); + $this->assertIsArray($rows['body']['data']['gridsListRows']); } /** @@ -243,7 +243,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); } /** @@ -273,7 +273,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesUpdateRow']; + $row = $row['body']['data']['gridsUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); @@ -319,7 +319,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -330,7 +330,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['databasesCreate']['_id']; + $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; // Step 2: Create table $query = $this->getQuery(self::$CREATE_TABLE); @@ -349,7 +349,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['tablesCreate']['_id']; + $tableId = $res['body']['data']['gridsCreateTable']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); @@ -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']['tablesCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -421,7 +421,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']['tablesUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); // Step 2: Fetch and validate updated rows $query = $this->getQuery(self::$GET_ROWS); @@ -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']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -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']['tablesUpsertRows']['rows']; + $rows = $response['body']['data']['gridsUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -515,7 +515,7 @@ 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']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` @@ -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']['tablesUpsertRow']; + $updated = $res['body']['data']['gridsUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -566,7 +566,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $deleted = $res['body']['data']['gridsDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); @@ -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']['tablesListRows']['total']); + $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php similarity index 90% rename from tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php rename to tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php index e4e9b34f35..aadee9749c 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php @@ -1,6 +1,6 @@ getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_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']['databasesCreate']; + $database = $database['body']['data']['gridsCreateDatabase']; $this->assertEquals('Actors', $database['name']); return $database; @@ -75,7 +75,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['tablesCreate']; + $table = $table['body']['data']['gridsCreateTable']; $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']['tablesCreate']; + $table2 = $table2['body']['data']['gridsCreateTable']; $this->assertEquals('Movies', $table2['name']); return [ @@ -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']['tablesCreateStringColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); return $data; } @@ -171,9 +171,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateStringColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateStringColumn']['required']); - $this->assertEquals('Default Value', $column['body']['data']['tablesUpdateStringColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateStringColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $column['body']['data']['gridsUpdateStringColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -206,7 +206,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); return $data; } @@ -241,11 +241,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateIntegerColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateIntegerColumn']['required']); - $this->assertEquals(12, $column['body']['data']['tablesUpdateIntegerColumn']['min']); - $this->assertEquals(160, $column['body']['data']['tablesUpdateIntegerColumn']['max']); - $this->assertEquals(50, $column['body']['data']['tablesUpdateIntegerColumn']['default']); + $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->assertEquals(200, $column['headers']['status-code']); return $data; @@ -276,7 +276,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateBooleanColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateBooleanColumn']); return $data; } @@ -309,9 +309,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateBooleanColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateBooleanColumn']['required']); - $this->assertTrue($column['body']['data']['tablesUpdateBooleanColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateBooleanColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateBooleanColumn']['required']); + $this->assertTrue($column['body']['data']['gridsUpdateBooleanColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -345,7 +345,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateFloatColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateFloatColumn']); return $data; } @@ -380,11 +380,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateFloatColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateFloatColumn']['required']); - $this->assertEquals(100.0, $column['body']['data']['tablesUpdateFloatColumn']['min']); - $this->assertEquals(1000000.0, $column['body']['data']['tablesUpdateFloatColumn']['max']); - $this->assertEquals(2500.0, $column['body']['data']['tablesUpdateFloatColumn']['default']); + $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->assertEquals(200, $column['headers']['status-code']); return $data; @@ -415,7 +415,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateEmailColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateEmailColumn']); return $data; } @@ -448,9 +448,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateEmailColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateEmailColumn']['required']); - $this->assertEquals('torsten@appwrite.io', $column['body']['data']['tablesUpdateEmailColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateEmailColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['gridsUpdateEmailColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -486,7 +486,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateEnumColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateEnumColumn']); return $data; } @@ -525,11 +525,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateEnumColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateEnumColumn']['required']); - $this->assertEquals('tech', $column['body']['data']['tablesUpdateEnumColumn']['default']); - $this->assertContains('tech', $column['body']['data']['tablesUpdateEnumColumn']['elements']); - $this->assertNotContains('guest', $column['body']['data']['tablesUpdateEnumColumn']['elements']); + $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->assertEquals(200, $column['headers']['status-code']); return $data; @@ -560,7 +560,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateDatetimeColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateDatetimeColumn']); return $data; } @@ -593,9 +593,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateDatetimeColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateDatetimeColumn']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['tablesUpdateDatetimeColumn']['default']); + $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->assertEquals(200, $column['headers']['status-code']); return $data; @@ -628,7 +628,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateRelationshipColumn']); return $data; } @@ -659,7 +659,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['gridsUpdateRelationshipColumn']); return $data; } @@ -690,7 +690,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIpColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIpColumn']); return $data; } @@ -723,9 +723,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateIpColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateIpColumn']['required']); - $this->assertEquals('127.0.0.1', $column['body']['data']['tablesUpdateIpColumn']['default']); + $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->assertEquals(200, $column['headers']['status-code']); return $data; @@ -757,7 +757,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateUrlColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateUrlColumn']); return $data; } @@ -790,9 +790,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateUrlColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateUrlColumn']['required']); - $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['tablesUpdateUrlColumn']['default']); + $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->assertEquals(200, $column['headers']['status-code']); } @@ -826,12 +826,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['tablesCreateIndex']); + $this->assertIsArray($index['body']['data']['gridsCreateIndex']); return [ 'database' => $data['database'], 'table' => $data['table'], - 'index' => $index['body']['data']['tablesCreateIndex'], + 'index' => $index['body']['data']['gridsCreateIndex'], ]; } @@ -877,7 +877,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesCreateRow']; + $row = $row['body']['data']['gridsCreateRow']; $this->assertIsArray($row); return [ @@ -930,7 +930,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASES); + $query = $this->getQuery(self::$GRIDS_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']['databasesList']); + $this->assertIsArray($databases['body']['data']['gridsListDatabases']); } /** @@ -952,7 +952,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASE); + $query = $this->getQuery(self::$GRIDS_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']['databasesGet']); + $this->assertIsArray($database['body']['data']['gridsGetDatabase']); } /** @@ -990,9 +990,11 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['tablesList']); + $this->assertIsArray($tables['body']['data']['gridsListTables']); } /** @@ -1018,7 +1020,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['tablesGet']); + $this->assertIsArray($table['body']['data']['gridsGetTable']); } /** @@ -1045,7 +1047,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $columns['body']); $this->assertIsArray($columns['body']['data']); - $this->assertIsArray($columns['body']['data']['tablesListColumns']); + $this->assertIsArray($columns['body']['data']['gridsListColumns']); } /** @@ -1072,7 +1074,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesGetColumn']); + $this->assertIsArray($column['body']['data']['gridsGetColumn']); } /** @@ -1098,7 +1100,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['tablesListIndexes']); + $this->assertIsArray($indices['body']['data']['gridsListIndexes']); } /** @@ -1125,7 +1127,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['tablesGetIndex']); + $this->assertIsArray($index['body']['data']['gridsGetIndex']); } /** @@ -1151,7 +1153,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['tablesListRows']); + $this->assertIsArray($rows['body']['data']['gridsListRows']); } /** @@ -1178,7 +1180,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); } // /** @@ -1235,7 +1237,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1251,7 +1253,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['databasesUpdate']); + $this->assertIsArray($database['body']['data']['gridsUpdateDatabase']); } /** @@ -1279,7 +1281,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['tablesUpdate']); + $this->assertIsArray($table['body']['data']['gridsUpdateTable']); } /** @@ -1309,7 +1311,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesUpdateRow']; + $row = $row['body']['data']['gridsUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); } @@ -1450,7 +1452,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DATABASE); + $query = $this->getQuery(self::$GRIDS_DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1480,7 +1482,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1491,7 +1493,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['databasesCreate']['_id']; + $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; // Step 2: Create table $query = $this->getQuery(self::$CREATE_TABLE); @@ -1510,7 +1512,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['tablesCreate']['_id']; + $tableId = $res['body']['data']['gridsCreateTable']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); @@ -1543,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']['tablesCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -1581,7 +1583,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']['tablesUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); // Step 2: Fetch and validate updated rows $query = $this->getQuery(self::$GET_ROWS); @@ -1597,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']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -1649,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']['tablesUpsertRows']['rows']; + $rows = $response['body']['data']['gridsUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -1674,7 +1676,7 @@ 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']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` @@ -1693,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']['tablesUpsertRow']; + $updated = $res['body']['data']['gridsUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -1724,7 +1726,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $deleted = $res['body']['data']['gridsDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); @@ -1740,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']['tablesListRows']['total']); + $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); return $data; } diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index a752740ca2..d527f24a93 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -13,7 +13,6 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Migration\Resource; use Utopia\Migration\Sources\Appwrite; -use Utopia\Migration\Sources\CSV; trait MigrationsBase { @@ -440,7 +439,7 @@ trait MigrationsBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', [ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -454,7 +453,7 @@ trait MigrationsBase $tableId = $table['body']['$id']; // Create Column - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -469,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 . '/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -502,7 +501,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -514,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 . '/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -548,7 +547,7 @@ trait MigrationsBase $table = $data['tableId']; $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -598,7 +597,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table . '/rows/' . $rowId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -920,7 +919,7 @@ trait MigrationsBase $databaseId = $response['body']['$id']; // make a table - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -935,7 +934,7 @@ trait MigrationsBase $tableId = $response['body']['$id']; // make columns - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -951,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 . '/tables/' . $tableId . '/columns/integer', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1176,7 +1175,7 @@ trait MigrationsBase }, 1000, 500); // get rows count - $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/tables/'.$tableId.'/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/grids/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 0f1f43d1e4..a318eb82ba 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 . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 fe9a4ed366..35cf003586 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 . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/columns/string', array_merge([ + $extra = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ + $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 30d39a27bb..1d9b9061d9 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 . '/tables/' . $id, array_merge([ + $actors = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['actorsId'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/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 . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/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 . '/tables/' . $actors['body']['$id'], array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey']